Merge pull request #7607 from smola/run-in-docker-macos

avoid using realpath in scripts
This commit is contained in:
Anca Iordache 2020-08-03 11:57:44 +02:00 committed by GitHub
commit 96d15acca6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -36,7 +36,10 @@ if [ "$(pwd)" != '/' ]; then
fi
if [ -n "$COMPOSE_FILE" ]; then
COMPOSE_OPTIONS="$COMPOSE_OPTIONS -e COMPOSE_FILE=$COMPOSE_FILE"
compose_dir=$(realpath "$(dirname "$COMPOSE_FILE")")
compose_dir="$(dirname "$COMPOSE_FILE")"
# canonicalize dir, do not use realpath or readlink -f
# since they are not available in some systems (e.g. macOS).
compose_dir="$(cd "$compose_dir" && pwd)"
fi
if [ -n "$COMPOSE_PROJECT_NAME" ]; then
COMPOSE_OPTIONS="-e COMPOSE_PROJECT_NAME $COMPOSE_OPTIONS"