Skip to content

Commit

Permalink
mrchief#17 - Write config file to a temporary directory
Browse files Browse the repository at this point in the history
  • Loading branch information
mrmeyers99 committed Aug 17, 2021
1 parent 010bee2 commit db81b5e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@
set -u
set -o pipefail

awsDir=$(mktemp -d)
config="${awsDir}/config"
awsDir="${HOME}/.aws"
configDir="$(mktemp -d)"
config="${configDir}/config"
credentials="${awsDir}/credentials"

# Delete the temporary file when this script finishes running, is interrupted, or exits abnormally
trap "rm -Rf $awsDir" 0 2 3 15
trap "rm -Rf $configDir" 0 2 3 15

echo -e "[profile default]\noutput = json" >"$config"

Expand Down

0 comments on commit db81b5e

Please sign in to comment.