提交 e359d83c 编写于 作者: J João Moreno 提交者: GitHub

Merge pull request #21016 from flagello/escape_paths_code_bash_script

Escape paths in 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 "$@"
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册