Skip to content

Commit

Permalink
works for both?
Browse files Browse the repository at this point in the history
  • Loading branch information
edif2008 committed Sep 1, 2021
1 parent 92c72ad commit 4332c91
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,7 @@ for env_var in $(op env ls); do
managed_variables+=("$env_var")

else
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
# Prepare the secret_value to be outputed properly (especially multiline secrets)
secret_value="${secret_value//'%'/'%25'}"
secret_value="${secret_value//$'\n'/'%0A'}"
secret_value="${secret_value//$'\r'/'%0D'}"
elif [[ "$OSTYPE" == "darwin"* ]]; then
secret_value=$(echo "$secret_value" | awk -v ORS='%0A' '1')
fi
secret_value=$(echo "$secret_value" | awk -v ORS='%0A' '1')

echo "::set-output name=$env_var::$secret_value"
fi
Expand Down

0 comments on commit 4332c91

Please sign in to comment.