Merge pull request #265 from urzds/patch-1

Fix dockcross script for users/groups containing spaces
This commit is contained in:
Matt McCormick 2018-09-30 16:01:38 -04:00 committed by GitHub
commit bb77f813c0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -178,7 +178,7 @@ UBUNTU_ON_WINDOWS=$([ -e /proc/version ] && grep -l Microsoft /proc/version || e
MSYS=$([ -e /proc/version ] && grep -l MINGW /proc/version || echo "") MSYS=$([ -e /proc/version ] && grep -l MINGW /proc/version || echo "")
if [ -z "$UBUNTU_ON_WINDOWS" -a -z "$MSYS" ]; then if [ -z "$UBUNTU_ON_WINDOWS" -a -z "$MSYS" ]; then
USER_IDS="-e BUILDER_UID=$( id -u ) -e BUILDER_GID=$( id -g ) -e BUILDER_USER=$( id -un ) -e BUILDER_GROUP=$( id -gn )" USER_IDS=(-e BUILDER_UID="$( id -u )" -e BUILDER_GID="$( id -g )" -e BUILDER_USER="$( id -un )" -e BUILDER_GROUP="$( id -gn )")
fi fi
# Change the PWD when working in Docker on Windows # Change the PWD when working in Docker on Windows
@ -220,7 +220,7 @@ CONTAINER_NAME=dockcross_$RANDOM
docker run $TTY_ARGS --name $CONTAINER_NAME \ docker run $TTY_ARGS --name $CONTAINER_NAME \
-v "$HOST_PWD":/work \ -v "$HOST_PWD":/work \
$HOST_VOLUMES \ $HOST_VOLUMES \
$USER_IDS \ "${USER_IDS[@]}" \
$FINAL_ARGS \ $FINAL_ARGS \
$FINAL_IMAGE "$@" $FINAL_IMAGE "$@"
run_exit_code=$? run_exit_code=$?