diff --git a/scripts/code.sh b/scripts/code.sh index 4ce722d2b27..bda04bb880c 100755 --- a/scripts/code.sh +++ b/scripts/code.sh @@ -2,13 +2,13 @@ if [[ "$OSTYPE" == "darwin"* ]]; then realpath() { [[ $1 = /* ]] && echo "$1" || echo "$PWD/${1#./}"; } - ROOT=$(dirname $(dirname $(realpath "$0"))) + ROOT=$(dirname "$(dirname "$(realpath "$0")")") else - ROOT=$(dirname $(dirname $(readlink -f $0))) + ROOT=$(dirname "$(dirname "$(readlink -f $0)")") fi function code() { - cd $ROOT + cd "$ROOT" if [[ "$OSTYPE" == "darwin"* ]]; then NAME=`node -p "require('./product.json').nameLong"` @@ -41,7 +41,4 @@ function code() { exec "$CODE" . "$@" } -# Use the following to get v8 tracing: -# code --js-flags="--trace-hydrogen --trace-phase=Z --trace-deopt --code-comments --hydrogen-track-positions --redirect-code-traces" "$@" - code "$@"