From 7fd9a457c3262f95fbf9de14cea31ac10eb3549f Mon Sep 17 00:00:00 2001 From: dev-qwen2 Date: Fri, 17 Apr 2026 07:36:12 +0000 Subject: [PATCH] =?UTF-8?q?fix:=20[nomad-step-3]=20S3-fix=20=E2=80=94=20de?= =?UTF-8?q?ploy.sh=20crashes=20on=20hyphenated=20job=20name=20+=20wp-oauth?= =?UTF-8?q?=20double=20lib/=20path=20(#944)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/init/nomad/deploy.sh | 3 ++- lib/init/nomad/wp-oauth-register.sh | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/init/nomad/deploy.sh b/lib/init/nomad/deploy.sh index a1724c5..7cf9278 100755 --- a/lib/init/nomad/deploy.sh +++ b/lib/init/nomad/deploy.sh @@ -177,7 +177,8 @@ for job_name in "${JOBS[@]}"; do fi # Per-job timeout override: JOB_READY_TIMEOUT_ - job_upper=$(printf '%s' "$job_name" | tr '[:lower:]' '[:upper:]') + # Sanitize job name: replace hyphens with underscores (bash vars can't have hyphens) + job_upper=$(printf '%s' "$job_name" | tr '[:lower:]-' '[:upper:]_' | tr ' ' '_') timeout_var="JOB_READY_TIMEOUT_${job_upper}" job_timeout="${!timeout_var:-$JOB_READY_TIMEOUT_SECS}" diff --git a/lib/init/nomad/wp-oauth-register.sh b/lib/init/nomad/wp-oauth-register.sh index 9b7f12a..6d2a4cd 100755 --- a/lib/init/nomad/wp-oauth-register.sh +++ b/lib/init/nomad/wp-oauth-register.sh @@ -44,7 +44,7 @@ set -euo pipefail # Source the hvault module for Vault helpers SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" REPO_ROOT="$(cd "${SCRIPT_DIR}/../.." && pwd)" -# shellcheck source=../../lib/hvault.sh +# shellcheck source=../../../lib/hvault.sh source "${REPO_ROOT}/lib/hvault.sh" # Configuration -- 2.49.1