diff --git a/bin/compose b/bin/compose index 895b289..ad1f211 100755 --- a/bin/compose +++ b/bin/compose @@ -358,15 +358,17 @@ clean_unused_sessions() { } -relink_subdirs() { +check_no_links_subdirs() { local dir for dir in "$@"; do - [ -L "$dir" ] || continue - target=$(realpath "$dir") - [ -d "$target" ] || continue - docker_run_opts+=("-v" "$target:$dir") + [ -d "$dir" ] || continue + if [ -L "$dir" ]; then + err "Unfortunately, this compose launcher do not support yet symlinks in charm-store." + echo " Found symlink in charm-store: $dir" >&2 + return 1 + fi [ -e "$dir/metadata.yml" ] && continue - relink_subdirs "$dir"/* + check_no_links_subdirs "$dir"/* || return 1 done } @@ -540,7 +542,7 @@ mk_docker_run_options() { "-e" "CHARM_STORE=/srv/charm-store" "-e" "HOST_CHARM_STORE=$CHARM_STORE" ) - relink_subdirs "$CHARM_STORE"/* + check_no_links_subdirs "$CHARM_STORE"/* || exit 1 ## DEFAULT_COMPOSE_FILE if [ "${DEFAULT_COMPOSE_FILE+x}" ]; then