From 21b87738cb7df38ce7420dd75f2a80dc7fb1313c Mon Sep 17 00:00:00 2001 From: "Sean P. Kelly" Date: Tue, 30 Jul 2024 23:23:09 +0000 Subject: [PATCH] imghelper: hoist AWS vars into global environment When secure boot signing was refactored in 310cadd8, 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 supllied. This adds the -g option to export the variables into the caller's environment as intended. --- twoliter/embedded/imghelper | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/twoliter/embedded/imghelper b/twoliter/embedded/imghelper index 0091093ee..c4ad05de6 100755 --- a/twoliter/embedded/imghelper +++ b/twoliter/embedded/imghelper @@ -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