Skip to content

Commit e87af87

Browse files
committed
[CodeStyle] Address Shellcheck finding 'SC2155 in iso-ca-bundle-config.sh': _token variable is now declared and assigned separately to avoid masking return values.
Signed-off-by: Giacomo Marciani <[email protected]>
1 parent 9282157 commit e87af87

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

cookbooks/aws-parallelcluster-platform/files/isolated/iso-ca-bundle-config.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
set -ex
33

44
function get_instance_region {
5-
local _token=$(curl -X PUT "http://169.254.169.254/latest/api/token" -H "X-aws-ec2-metadata-token-ttl-seconds: 3600")
5+
local _token
6+
_token=$(curl -X PUT "http://169.254.169.254/latest/api/token" -H "X-aws-ec2-metadata-token-ttl-seconds: 3600")
67
curl -H "X-aws-ec2-metadata-token: $_token" -v "http://169.254.169.254/latest/meta-data/placement/region" 2> /dev/null
78
}
89

0 commit comments

Comments
 (0)