okta-aws passing profile name twice to aws CLI
dangeReis opened this issue · 3 comments
Describe the bug
On MacOS (and probably other linux), it seems that withokta isn't stripping the profile name from the arg list when it calls withokta using the following alias
function okta-aws {
withokta "aws --profile $1" "$@"
}
All we get is a generic error from aws CLI complaining about bad arguments.
If the function is changed to
function okta-aws {
withokta "aws --profile" "$@"
}
it seems to work fine, although I'm not sure that's the correct solution.
To Reproduce
Steps to reproduce the behavior:
- Run
okta-aws test sts get-caller-identity
- See error
Expected behavior
Get logged into the profile and get your caller identity.
Pretty sure this is related to #376, I think the fix is straightforward (see my comment).
@hcourse-nydig yes, it appears to be the same issue (although the fix is slightly different for bash).
If you've got time, could you double check the PR? This seems like a weirdly fundamental issue to still exist so I wonder if we're missing something? Anyway, should do the job!