Skip to content

Commit d4704eb

Browse files
committed
Fix path, only run assertSvcRunning on env up.
1 parent dcffdf5 commit d4704eb

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

bin/warden

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
set -e
33
trap 'error "$(printf "Command \`%s\` at $BASH_SOURCE:$LINENO failed with exit code $?" "$BASH_COMMAND")"' ERR
44

5-
## find directory where this script is located following symlinks if neccessary
5+
## find directory where this script is located following symlinks if necessary
66
readonly WARDEN_DIR="$(
77
cd "$(
88
dirname "$(
@@ -17,7 +17,7 @@ export readonly WARDEN_BIN="${WARDEN_DIR}/bin/warden"
1717
export readonly DOCKER_COMPOSE_COMMAND="${DOCKER_COMPOSE_COMMAND:-"docker compose"}"
1818

1919
source "${WARDEN_DIR}/utils/core.sh"
20-
source "${WARDEN_BIN}/utils/svc.sh"
20+
source "${WARDEN_DIR}/utils/svc.sh"
2121
source "${WARDEN_DIR}/utils/env.sh"
2222

2323
## verify docker is installed

commands/env.cmd

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,11 @@
44
WARDEN_ENV_PATH="$(locateEnvPath)" || exit $?
55
loadEnvConfig "${WARDEN_ENV_PATH}" || exit $?
66
assertDockerRunning
7-
assertSvcRunning
7+
8+
## warn if global services are not running
9+
if [[ "${WARDEN_PARAMS[0]}" == "up" ]]; then
10+
assertSvcRunning
11+
fi
812

913
HOST_UID=$(id -u)
1014
HOST_GID=$(id -g)

utils/svc.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ function assertSvcRunning() {
77
wardenNetworkId=$(docker network ls -q --filter name="${wardenNetworkName}")
88

99
if [[ -z "${wardenNetworkId}" ]]; then
10-
warning "Warden is not currently running.\033[0m Run \033[36mwarden svc up\033[0m to start Warden core services."
10+
warning "Warden core services are not currently running.\033[0m Run \033[36mwarden svc up\033[0m to start Warden core services."
1111
fi
1212
}

0 commit comments

Comments
 (0)