Browse Source

fix: [compose-core] make ``get_relation_data_dir()`` output correct directory even when run from a relation

Signed-off-by: Valentin Lab <valentin.lab@kalysto.org>
master
Valentin Lab 2 years ago
parent
commit
cb1772f187
  1. 7
      bin/compose-core

7
bin/compose-core

@ -2812,8 +2812,11 @@ get_relation_data_dir() {
cat "$cache_file"
return 0
fi
project=$(get_default_project_name) || return 1
local project relation_dir
project=${PROJECT_NAME}
if [ -z "$project" ]; then
project=$(get_default_project_name) || return 1
fi
relation_dir="$VARDIR/relations/$project/${service}-${target_service}/$relation_name"
if ! [ -d "$relation_dir" ]; then
mkdir -p "$relation_dir" || return 1

Loading…
Cancel
Save