Skip to content

Commit

Permalink
region(): Export AWS_REGION if not set
Browse files Browse the repository at this point in the history
Some things want this.
  • Loading branch information
mbailey committed Oct 2, 2024
1 parent 2307863 commit b669462
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/region-functions
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ region() {
echo "${AWS_DEFAULT_REGION:-'AWS_DEFAULT_REGION not set'}"
else
export AWS_DEFAULT_REGION="$inputs"
# Update AWS_REGION only if already set.
if [[ -n $AWS_REGION ]]; then
export AWS_REGION="$AWS_DEFAULT_REGION"
fi
fi
}

Expand Down

0 comments on commit b669462

Please sign in to comment.