Skip to content

Commit 4f4b65a

Browse files
committed
Fix windows bug with default compose separator
1 parent f64934a commit 4f4b65a

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

lib/shared.bash

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,9 +114,19 @@ function docker_compose_config_files() {
114114
return
115115
fi
116116

117+
# If COMPOSE_PATH_SEPARATOR is not set, use the default separator
118+
SEPARATOR="${COMPOSE_PATH_SEPARATOR:-}"
119+
if [ -z ${SEPARATOR} ]; then
120+
if is_windows ; then
121+
SEPARATOR=";"
122+
else
123+
SEPARATOR=":"
124+
fi
125+
fi
126+
117127
# Process any (deprecated) colon delimited config paths
118128
for value in "${config_files[@]}" ; do
119-
echo "$value" | tr ':' '\n'
129+
echo "$value" | tr "${SEPARATOR}" '\n'
120130
done
121131
}
122132

0 commit comments

Comments
 (0)