Skip to content
Snippets Groups Projects
Commit adc2c94b authored by nimrod's avatar nimrod
Browse files

Small fix to assume-role.

parent e3bc5061
No related branches found
No related tags found
No related merge requests found
......@@ -20,7 +20,7 @@ fi
role="$1"
shift
if [ "$(aws iam list-mfa-devices --query 'length(MFADevices)')" -gt 0 ]
if mfa_count="$(aws iam list-mfa-devices --query 'length(MFADevices)' 2>/dev/null)" && [ "$mfa_count" -gt 0 ]
then
printf "Enter the MFA token: "
read -r mfa_token
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment