From 7e4b90e76229251c4ea19a9641a321575c63d1d5 Mon Sep 17 00:00:00 2001 From: William Esz Date: Tue, 21 Feb 2017 19:45:32 +0100 Subject: [PATCH] Escape paths to fix Microsoft/vscode#20907 --- scripts/npm.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/npm.sh b/scripts/npm.sh index 9d959788dfc..b56ec27c7fd 100755 --- a/scripts/npm.sh +++ b/scripts/npm.sh @@ -2,10 +2,10 @@ if [[ "$OSTYPE" == "darwin"* ]]; then realpath() { [[ $1 = /* ]] && echo "$1" || echo "$PWD/${1#./}"; } - ROOT=$(dirname $(dirname $(realpath "$0"))) + ROOT=$(dirname "$(dirname "$(realpath "$0")")") npm_config_arch=x64 else - ROOT=$(dirname $(dirname $(readlink -f $0))) + ROOT=$(dirname "$(dirname "$(readlink -f $0)")") # if [ -z $npm_config_arch ]; then # npm_config_arch=$(node -p process.arch) @@ -14,7 +14,7 @@ else fi ELECTRON_VERSION=$( - cat $ROOT/package.json | + cat "$ROOT"/package.json | grep electronVersion | sed -e 's/[[:space:]]*"electronVersion":[[:space:]]*"\([0-9.]*\)"\(,\)*/\1/' )