Protect spaces in all tools commands

This commit is contained in:
Baptiste Mathus 2018-09-18 00:28:28 +02:00
parent d8b6f3b0e1
commit 5ff395e4a1
5 changed files with 17 additions and 17 deletions

View File

@ -3,7 +3,7 @@
set -euo pipefail
exec docker run --rm \
-w ${PWD} \
-v ${PWD}:${PWD} \
-w "${PWD}" \
-v "${PWD}:${PWD}" \
-i \
realguess/jq:1.4 jq $@

View File

@ -1,7 +1,7 @@
#!/bin/sh -e
exec docker run --rm \
-w ${PWD} \
-v ${PWD}:${PWD} \
-w "${PWD}" \
-v "${PWD}:${PWD}" \
-i \
sahsu/docker-jsonlint jsonlint $@

View File

@ -1,11 +1,11 @@
#!/bin/sh -e
MAVEN_REPO=~/.m2/
mkdir -p $MAVEN_REPO/repository
mkdir -p "$MAVEN_REPO/repository"
exec docker run --rm \
-v "$(pwd)":/usr/src/mymaven \
-w /usr/src/mymaven \
-v $MAVEN_REPO:/var/maven/.m2 \
-v "$MAVEN_REPO:/var/maven/.m2" \
--user $( id -u ) -e MAVEN_CONFIG=/var/maven/.m2 \
maven:3.5.3-jdk-8 mvn -Duser.home=/var/maven $@

View File

@ -7,7 +7,7 @@ if [ $? -eq 0 ]; then
TTY_ARGS="-ti"
fi;
COMMAND=$@
COMMAND="$@"
# The caller is passing in some custom paraneters to the `node` binary, so we
# need to override the entrypoint to explicitly call node
@ -18,17 +18,17 @@ fi;
exec docker run --net host --rm ${TTY_ARGS} \
-u $(id -u):$(id -g) \
-w ${PWD} \
-w "${PWD}" \
--mount type=tmpfs,destination=/.npm \
--mount type=tmpfs,destination=/.config \
-v ${PWD}:${PWD} \
-e PATH="$PWD/node_modules/.bin:/usr/local/bin:$PATH" \
-v "${PWD}:${PWD}" \
-e "PATH=$PWD/node_modules/.bin:/usr/local/bin:$PATH" \
-e LANG=C.UTF-8 \
-e DB_TRACING=$DB_TRACING \
-e LOG_LEVEL=$LOG_LEVEL \
-e DEBUG=$DEBUG \
-e FLAVOR=$FLAVOR \
-e SENTRY_DSN=$SENTRY_DSN \
-e "DB_TRACING=$DB_TRACING" \
-e "LOG_LEVEL=$LOG_LEVEL" \
-e "DEBUG=$DEBUG" \
-e "FLAVOR=$FLAVOR" \
-e "SENTRY_DSN=$SENTRY_DSN" \
$(printenv | grep -i \^evergreen | awk '{ print "-e", $1 }') \
$(printenv | grep -i \^node | awk '{ print "-e", $1 }') \
node:10 \

View File

@ -1,6 +1,6 @@
#!/bin/sh -e
exec docker run --rm \
-w ${PWD} \
-v ${PWD}:${PWD} \
-w "${PWD}" \
-v "${PWD}:${PWD}" \
koalaman/shellcheck@sha256:6dfafef2730b851e7a8bceda7f2dbef93efb709932865924cb497423b60be582 $@