Browse Source

chg: dev: [compose-core] minor performance improvement by delaying local declaration !minor

Signed-off-by: Valentin Lab <valentin.lab@kalysto.org>
cache-relation
Valentin Lab 3 years ago
parent
commit
21ec7626c6
  1. 2
      bin/compose-core

2
bin/compose-core

@ -3155,11 +3155,11 @@ export -f _save
get_default_project_name() { get_default_project_name() {
local normalized_path compose_yml_location name
if [ -n "$DEFAULT_PROJECT_NAME" ]; then if [ -n "$DEFAULT_PROJECT_NAME" ]; then
echo "$DEFAULT_PROJECT_NAME" echo "$DEFAULT_PROJECT_NAME"
return 0 return 0
fi fi
local normalized_path compose_yml_location name
compose_yml_location="$(get_compose_yml_location)" || return 1 compose_yml_location="$(get_compose_yml_location)" || return 1
if [ -n "$compose_yml_location" ]; then if [ -n "$compose_yml_location" ]; then
if normalized_path=$(readlink -f "$compose_yml_location"); then if normalized_path=$(readlink -f "$compose_yml_location"); then

Loading…
Cancel
Save