浏览代码

add clarification

Piotr Kwiecinski 1 年之前
父节点
当前提交
fc3870dcb6
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      compose/bin/docker-compose

+ 2 - 1
compose/bin/docker-compose

@@ -15,8 +15,9 @@ else
   COMPOSE_FILES+=("compose.dev.yaml")
   COMPOSE_FILES+=("compose.dev.yaml")
 fi
 fi
 
 
+# We create an array including files prefixed with -f here
+# to ensure paths with spaces aren't split when passed as parameters
 COMPOSE_FILES_PREFIXED=()
 COMPOSE_FILES_PREFIXED=()
-
 for file in "${COMPOSE_FILES[@]}"; do
 for file in "${COMPOSE_FILES[@]}"; do
   COMPOSE_FILES_PREFIXED+=("-f" "$file")
   COMPOSE_FILES_PREFIXED+=("-f" "$file")
 done
 done