-
Notifications
You must be signed in to change notification settings - Fork 177
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Shell arg fix #380
Shell arg fix #380
Conversation
Removes first param from arg lists before calling aws cli. Fixes both bash and fish Resolves: oktadev#375, oktadev#376
changing oktadeveloper to oktadev
🐛 Fixes shell arguments being passed twice to aws command
…/okta-aws-cli-assume-role into DavidTanner-updateInstallScripts
replaces #378 @hcourse-nydig @DavidTanner please confirm that this looks good. I basically took both of your solutions and combined them. Also sorry, not sure if there's a way to modify an existing PR, so created a new one. |
bin/install.sh
Outdated
@@ -111,12 +111,14 @@ fishFunctionsDir="${PREFIX}/fish_functions" | |||
mkdir -p "${fishFunctionsDir}" | |||
cat <<'EOF' >"${fishFunctionsDir}/okta-aws.fish" | |||
function okta-aws | |||
withokta "aws --profile $argv[1]" $argv | |||
set -lx OKTA_PROFILE "$argv[1]" | |||
OKTA_PROFILE="$1" withokta "aws --profile $argv[1]" $argv[2..-1] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as below. Doesn't work the same in fish as bash.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
…ume-role into shell-arg-fix
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@mraible what stands in the way of getting this merged in? |
@dangeReis Nothing. :) |
Problem Statement
Updating the withOkta script to not use the profile broke the okta-aws and okta-sls commands.
Solution
Set the profile in the respective commands. Also remove the profile from the arguments being passed in to aws cli (or sls cli). Additionally this stores the appropriate profile name in the .aws/credentials file.
This should fix #374 #375 #376