Skip to content

Commit 906f7ce

Browse files
ericfitzclaude
andcommitted
fix(scripts): fix tfvars parsing on macOS BSD sed
Replace \s with POSIX [[:space:]] in sed expression for compartment_id extraction. BSD sed doesn't support \s, causing the regex to silently fail and pass the raw line instead of the OCID value. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent b19fd5a commit 906f7ce

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

scripts/build-container-oracle.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ if [[ -z "$REPO_OCID" ]]; then
187187
COMPARTMENT_ID=""
188188
TFVARS_FILE="${PROJECT_ROOT}/terraform/environments/oci-production/terraform.tfvars"
189189
if [[ -f "$TFVARS_FILE" ]]; then
190-
COMPARTMENT_ID=$(grep -E '^compartment_id\s*=' "$TFVARS_FILE" | sed 's/.*=\s*"//' | sed 's/".*//' || true)
190+
COMPARTMENT_ID=$(grep -E '^compartment_id\s*=' "$TFVARS_FILE" | sed 's/.*=[[:space:]]*"//' | sed 's/".*//' || true)
191191
if [[ -n "$COMPARTMENT_ID" ]]; then
192192
log_info "Found compartment_id in terraform.tfvars"
193193
fi

0 commit comments

Comments
 (0)