File tree Expand file tree Collapse file tree
src/base/.devcontainer/scripts Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -96,8 +96,7 @@ check_packages curl ca-certificates gpg dirmngr unzip bash-completion less
9696verify_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
You can’t perform that action at this time.
0 commit comments