Skip to content

Commit 1c65c83

Browse files
committed
fix
1 parent bb77bf1 commit 1c65c83

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

src/base/.devcontainer/scripts/install_aws_sam_cli.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,7 @@ check_packages curl ca-certificates gpg dirmngr unzip bash-completion less
9696
verify_aws_sam_cli_gpg_signature() {
9797
local filePath=$1
9898
local sigFilePath=$2
99-
tmp_dir="$(mktemp -d)"
100-
trap 'rm -rf "${tmp_dir}"' EXIT
99+
local tmp_dir=$3
101100
local awsGpgKeyring="${tmp_dir}/aws-sam-cli-public-key.gpg"
102101

103102
echo "${PRIMARY_PUBLIC_KEY}" | gpg --dearmor > "${awsGpgKeyring}"
@@ -129,7 +128,7 @@ install() {
129128
curl -fsSL "${scriptUrl}" -o "${scriptZipFile}"
130129
curl -fsSL "${scriptUrl}.sig" -o "${scriptSigFile}"
131130

132-
if ! verify_aws_sam_cli_gpg_signature "$scriptZipFile" "$scriptSigFile"; then
131+
if ! verify_aws_sam_cli_gpg_signature "$scriptZipFile" "$scriptSigFile" "$tmp_dir"; then
133132
echo "Could not verify GPG signature of AWS SAM CLI install script. Make sure you provided a valid version."
134133
exit 1
135134
fi

0 commit comments

Comments
 (0)