diff --git a/apps/api/src/lib/buildPacks/compose.ts b/apps/api/src/lib/buildPacks/compose.ts index 2d16c1f8d..70a2ba8af 100644 --- a/apps/api/src/lib/buildPacks/compose.ts +++ b/apps/api/src/lib/buildPacks/compose.ts @@ -82,9 +82,10 @@ export default async function (data) { v.startsWith('.') || v.startsWith('..') || v.startsWith('/') || - v.startsWith('~') + v.startsWith('~') || + v.startsWith('$PWD') ) { - // Nothing to do here, host path + v = v.replace('$.', `~`).replace('$..', '~').replace('$$PWD', '~'); } else { if (!path) { path = v; diff --git a/apps/ui/src/routes/applications/[id]/storages.svelte b/apps/ui/src/routes/applications/[id]/storages.svelte index 7f16645a2..8a810b635 100644 --- a/apps/ui/src/routes/applications/[id]/storages.svelte +++ b/apps/ui/src/routes/applications/[id]/storages.svelte @@ -40,9 +40,10 @@ volume.startsWith('.') || volume.startsWith('..') || volume.startsWith('/') || - volume.startsWith('~') + volume.startsWith('~') || + volume.startsWith('$PWD') ) { - // Nothing to do here, host path + volume = volume.replace('$.', `~`).replace('$..', '~').replace('$$PWD', '~'); } else { if (!target) { target = volume;