mirror of
https://github.com/cupcakearmy/coolify.git
synced 2024-10-22 16:14:22 +02:00
fix: replace . & .. & $PWD with ~
This commit is contained in:
parent
04f7e8e777
commit
3e81d7e9cb
@ -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;
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user