mirror of
https://github.com/Microsoft/vscode
synced 2024-09-13 21:55:38 +00:00
Escape paths (related to #21010)
This commit is contained in:
parent
6480172752
commit
dd73aababe
|
@ -2,13 +2,13 @@
|
||||||
|
|
||||||
if [[ "$OSTYPE" == "darwin"* ]]; then
|
if [[ "$OSTYPE" == "darwin"* ]]; then
|
||||||
realpath() { [[ $1 = /* ]] && echo "$1" || echo "$PWD/${1#./}"; }
|
realpath() { [[ $1 = /* ]] && echo "$1" || echo "$PWD/${1#./}"; }
|
||||||
ROOT=$(dirname $(dirname $(realpath "$0")))
|
ROOT=$(dirname "$(dirname "$(realpath "$0")")")
|
||||||
else
|
else
|
||||||
ROOT=$(dirname $(dirname $(readlink -f $0)))
|
ROOT=$(dirname "$(dirname "$(readlink -f $0)")")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
function code() {
|
function code() {
|
||||||
cd $ROOT
|
cd "$ROOT"
|
||||||
|
|
||||||
if [[ "$OSTYPE" == "darwin"* ]]; then
|
if [[ "$OSTYPE" == "darwin"* ]]; then
|
||||||
NAME=`node -p "require('./product.json').nameLong"`
|
NAME=`node -p "require('./product.json').nameLong"`
|
||||||
|
@ -41,7 +41,4 @@ function code() {
|
||||||
exec "$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 "$@"
|
code "$@"
|
||||||
|
|
Loading…
Reference in a new issue