Browse Source

wip

fix-host-charm-resources
Boris Gallet 4 days ago
parent
commit
cae6e88889
  1. 8
      bin/compose-core

8
bin/compose-core

@ -4010,11 +4010,13 @@ _get_docker_compose_mixin_from_metadata_cached() {
fi fi
done < <(printf "%s" "$metadata" | shyaml get-values-0 "host-resources" 2>/dev/null) done < <(printf "%s" "$metadata" | shyaml get-values-0 "host-resources" 2>/dev/null)
while read-0 resource; do while read-0 resource; do
dest="$(charm.get_dir "$charm")/resources$resource"
charm_path="$(charm.get_dir "$charm")"
dest="$charm_path/resources$resource"
host_dest="$HOST_CHARM_STORE${dest#$CHARM_STORE}"
if ! [ -e "$dest" ]; then if ! [ -e "$dest" ]; then
die "charm-resource: '$resource' does not exist (file: '$dest')."
die "charm-resource: '$resource' does not exist (file: '$host_dest')."
fi fi
echo " - $dest:$resource:ro"
echo " - $host_dest:$resource:ro"
done < <(echo "$metadata" | shyaml get-values-0 "charm-resources" 2>/dev/null) done < <(echo "$metadata" | shyaml get-values-0 "charm-resources" 2>/dev/null)
) || return 1 ) || return 1
if [ "$volumes" ]; then if [ "$volumes" ]; then

Loading…
Cancel
Save