From 017e564080a8e2039d47d53918836e18b3f7d747 Mon Sep 17 00:00:00 2001 From: Eli Holmes - NOAA Date: Fri, 11 Oct 2024 08:08:39 -0700 Subject: [PATCH] Update rocker.sh --- rocker.sh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/rocker.sh b/rocker.sh index faf0a98..fc9c3a8 100644 --- a/rocker.sh +++ b/rocker.sh @@ -23,10 +23,9 @@ while IFS= read -r line; do # Check if the line starts with ENV or RUN if [[ "$line" == ENV* ]]; then # Assign variable - eval $(echo "$line" | sed 's/^ENV //g') - # Extract the variable assignment; removing "; could pose problems - # But needed so that " does not get turned into %22 - var_assignment=$(echo "$line" | sed 's/^ENV //g' | sed 's/"//g') + var_assignment=$(echo "$line" | sed 's/^ENV //g') + # Run this way eval "export ..." otherwise the " will get turned to %22 + eval "export $var_assignment" # Write the exported variable to env.txt echo "export $var_assignment" >> ${REPO_DIR}/env.txt elif [[ "$line" == RUN* ]]; then