소스 검색

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

avoid using realpath in scripts
Anca Iordache 5 년 전
부모
커밋
96d15acca6
1개의 변경된 파일4개의 추가작업 그리고 1개의 파일을 삭제
  1. 4 1
      script/run/run.sh

+ 4 - 1
script/run/run.sh

@@ -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"