Skip to content

Commit

Permalink
Update rocker.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
eeholmes authored Oct 11, 2024
1 parent 9db5d57 commit 017e564
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions rocker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 017e564

Please sign in to comment.