Merge pull request #21016 from flagello/escape_paths_code_bash_script
Escape paths in code.shpull/24523/head
commit
e359d83c06
|
@ -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 "$@"
|
||||
|
|
Loading…
Reference in New Issue