Skip to content

Commit dd73aab

Browse files
committed
Escape paths (related to microsoft#21010)
1 parent 6480172 commit dd73aab

1 file changed

Lines changed: 3 additions & 6 deletions

File tree

scripts/code.sh

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22

33
if [[ "$OSTYPE" == "darwin"* ]]; then
44
realpath() { [[ $1 = /* ]] && echo "$1" || echo "$PWD/${1#./}"; }
5-
ROOT=$(dirname $(dirname $(realpath "$0")))
5+
ROOT=$(dirname "$(dirname "$(realpath "$0")")")
66
else
7-
ROOT=$(dirname $(dirname $(readlink -f $0)))
7+
ROOT=$(dirname "$(dirname "$(readlink -f $0)")")
88
fi
99

1010
function code() {
11-
cd $ROOT
11+
cd "$ROOT"
1212

1313
if [[ "$OSTYPE" == "darwin"* ]]; then
1414
NAME=`node -p "require('./product.json').nameLong"`
@@ -41,7 +41,4 @@ function code() {
4141
exec "$CODE" . "$@"
4242
}
4343

44-
# Use the following to get v8 tracing:
45-
# code --js-flags="--trace-hydrogen --trace-phase=Z --trace-deopt --code-comments --hydrogen-track-positions --redirect-code-traces" "$@"
46-
4744
code "$@"

0 commit comments

Comments
 (0)