File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -18,11 +18,13 @@ if [[ "$1" == "debug" ]]; then
1818fi
1919
2020# Replace local path with remote path in any file path arguments
21- # e.g. /User /me/totara-sites/mysite/server/plugin/test.php -> /var/www/totara/src/mysite/server/plugin/test.php
21+ # e.g. //wsl.localhost/Ubuntu/home /me/totara-sites/mysite/server/plugin/test.php -> /var/www/totara/src/mysite/server/plugin/test.php
2222args=()
2323for arg in " $@ " ; do
24- if [[ " $arg " == " $LOCAL_SRC " * && -e " $arg " ]]; then
25- arg=" $REMOTE_SRC ${arg# $LOCAL_SRC } "
24+ if [[ " $arg " == * " $LOCAL_SRC " * ]]; then
25+ arg=" $REMOTE_SRC ${arg#* $LOCAL_SRC } "
26+ # Strip any unescaped single quote characters
27+ arg=$( echo " $arg " | sed " s/\([^']\)'\([^']\)/\1\2/g; s/^'//; s/'$//" )
2628 fi
2729 args+=(" $arg " )
2830done
You can’t perform that action at this time.
0 commit comments