vs-shell-format
vs-shell-format copied to clipboard
quoting issues using the formatter
We see quoting issues after activating this extension
Variables that were quoted before, are quoted again, leading to incorrect commands. Example:
mount="-v /tmp:/tmp"
cmd="bash"
conditional_flag=''
docker run $mount $conditional_flag busybox bash -c $cmd
becomes
docker run "$mount" "$conditional_flag" busybox bash -c "$cmd"
which translates to
docker run '-v /tmp:/tmp' '' busybox bash -c 'echo ok'
which makes the comand invalid because of the empty quotes