Skip to content

Commit

Permalink
imghelper: hoist AWS vars into global environment
Browse files Browse the repository at this point in the history
When secure boot signing was refactored in 310cadd, the code that
exports AWS credential variables into the global environment was moved
into a bash function.

When used in a bash function, the `declare` keyword makes the declared
symbol local, unless the -g option is also supplied. This adds the -g
option to export the variables into the caller's environment as
intended.
  • Loading branch information
cbgbt committed Jul 30, 2024
1 parent e2a9fa6 commit 299f5b3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion twoliter/embedded/imghelper
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ sbsetup_aws_profile() {
val="${var,,}"
val="${HOME}/.aws/${val//_/-}.env"
[[ -s "${val}" ]] || continue
declare -x "${var}=$(cat "${val}")"
declare -g -x "${var}=$(cat "${val}")"
done
# Verify that AWS credentials are functional.
aws sts get-caller-identity
Expand Down

0 comments on commit 299f5b3

Please sign in to comment.