Skip to content

Commit b7e178d

Browse files
FiloSottilegopherbot
authored andcommitted
npm,npx: quote argument expansions
Using $@ instead of "$@" means npm "foo bar" will be expanded to npm foo bar unexpectedly. Also, pwd output may contain spaces. Caught by shellcheck. Change-Id: I045ac3289e65698c6c1fb1396420fba8fe0473e1 Reviewed-on: https://go-review.googlesource.com/c/website/+/635615 Reviewed-by: Dmitri Shuralyov <[email protected]> Reviewed-by: Dmitri Shuralyov <[email protected]> Auto-Submit: Filippo Valsorda <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Hyang-Ah Hana Kim <[email protected]>
1 parent 22adbef commit b7e178d

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

npm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55

66
docker run \
77
--rm \
8-
--volume $(pwd):/workspace \
8+
--volume "$(pwd)":/workspace \
99
--workdir /workspace \
1010
--env NODE_OPTIONS="--experimental-vm-modules --no-warnings" \
1111
--entrypoint npm \
1212
node:16.13.1-alpine3.14 \
13-
$@
13+
"$@"

npx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55

66
docker run \
77
--rm \
8-
--volume $(pwd):/workspace \
8+
--volume "$(pwd)":/workspace \
99
--workdir /workspace \
1010
--env NODE_OPTIONS="--experimental-vm-modules --no-warnings" \
1111
--entrypoint npx \
1212
node:16.13.1-alpine3.14 \
13-
$@
13+
"$@"

0 commit comments

Comments
 (0)