From 9b3c3872c128ebdc3ac89f298e358965d1ae3eb3 Mon Sep 17 00:00:00 2001 From: Brett Patterson Date: Sun, 30 Jul 2023 13:54:40 -0400 Subject: [PATCH] Fix stripping of '-' character from project names/urls --- commands/status.cmd | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/commands/status.cmd b/commands/status.cmd index 1d273bb5..46b03edb 100644 --- a/commands/status.cmd +++ b/commands/status.cmd @@ -17,7 +17,8 @@ IFS="$OLDIFS" messageList=() for projectNetwork in "${projectNetworkList[@]}"; do - [[ -z "${projectNetwork}" || "${projectNetwork}" == "${wardenNetworkName}" ]] && continue # Skip empty project network names (if any) + # Skip empty names and the Warden core services network + test -z "${projectNetwork}" -o "${projectNetwork}" = "${wardenNetworkName}" && continue prefix="${projectNetwork%_default}" prefixLen="${#prefix}" @@ -28,9 +29,9 @@ for projectNetwork in "${projectNetworkList[@]}"; do [[ -z "${container}" ]] && continue # Project is not running, skip it projectDir=$(docker container inspect --format '{{ index .Config.Labels "com.docker.compose.project.working_dir"}}' "$container") - projectName=$(cat "${projectDir}/.env" | grep '^WARDEN_ENV_NAME=' | sed -e 's/WARDEN_ENV_NAME=[[:space:]]*//g' | tr -d -) - projectType=$(cat "${projectDir}/.env" | grep '^WARDEN_ENV_TYPE=' | sed -e 's/WARDEN_ENV_TYPE=[[:space:]]*//g' | tr -d -) - traefikDomain=$(cat "${projectDir}/.env" | grep '^TRAEFIK_DOMAIN=' | sed -e 's/TRAEFIK_DOMAIN=[[:space:]]*//g' | tr -d -) + projectName=$(cat "${projectDir}/.env" | grep '^WARDEN_ENV_NAME=' | sed -e 's/WARDEN_ENV_NAME=[[:space:]]*//g') + projectType=$(cat "${projectDir}/.env" | grep '^WARDEN_ENV_TYPE=' | sed -e 's/WARDEN_ENV_TYPE=[[:space:]]*//g') + traefikDomain=$(cat "${projectDir}/.env" | grep '^TRAEFIK_DOMAIN=' | sed -e 's/TRAEFIK_DOMAIN=[[:space:]]*//g') messageList+=(" \033[1;35m${projectName}\033[0m a \033[36m${projectType}\033[0m project") messageList+=(" Project Directory: \033[33m${projectDir}\033[0m")