Browse Source

new: [compose-core] add code improvements !minor

fix-host-charm-resources
Valentin Lab 2 months ago
parent
commit
810f0c6049
  1. 8
      bin/compose-core

8
bin/compose-core

@ -2398,8 +2398,8 @@ export -f get_compose_relations
get_all_services() {
local cache_file="$state_tmpdir/$FUNCNAME.cache.$(H "$GLOBAL_ALL_RELATIONS_HASH")" \
s rn ts rc td services
local cache_file="$state_tmpdir/$FUNCNAME.cache.$GLOBAL_ALL_RELATIONS_HASH" \
s rn ts rc td services service
if [ -e "$cache_file" ]; then
#debug "$FUNCNAME: SESSION cache hit $1"
cat "$cache_file"
@ -2418,7 +2418,7 @@ get_all_services() {
services["$service"]=1
echo "$service"
done
done < <(cat "$GLOBAL_ALL_RELATIONS") > "$cache_file"
done < "$GLOBAL_ALL_RELATIONS" > "$cache_file"
cat "$cache_file"
}
@ -4926,7 +4926,7 @@ esac
get_all_relations "${services_args[@]}" >/dev/null || exit 1
if [ "$is_docker_compose_action" -a "${#services_args[@]}" -gt 0 ]; then
if [ -n "$is_docker_compose_action" ] && [ "${#services_args[@]}" -gt 0 ]; then
services=($(get_master_services "${services_args[@]}")) || exit 1
if [ "$action" == "up" ]; then
declare -A seen

Loading…
Cancel
Save