-
Notifications
You must be signed in to change notification settings - Fork 49
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
Need to work around Windows is lacking eval
equivalent
#188
Labels
Milestone
Comments
synfinatic
added
bug
Something isn't working
help-wanted
Extra attention is needed
labels
Dec 21, 2021
synfinatic
added a commit
that referenced
this issue
Dec 21, 2021
- Can't use `eval` with Windows (#188) - Default to `cmd.exe` for `exec` on Windows - Detect invalid accountId with -A flag - Improve docs for Windows in FAQ
synfinatic
added a commit
that referenced
this issue
Dec 21, 2021
- Can't use `eval` with Windows CommandPrompt/PowerShell (#188) - Default to `cmd.exe` for `exec` on Windows - Detect invalid accountId with -A flag - Improve docs for Windows in FAQ
synfinatic
added a commit
that referenced
this issue
Dec 21, 2021
- Can't use `eval` with Windows CommandPrompt/PowerShell (#188) - Default to `cmd.exe` for `exec` on Windows - Detect invalid accountId with -A flag - Improve docs for Windows in FAQ - Fully fix bogus wincred error in last PR
In powershell there is an equivalent to eval, and it's Invoke-Expression. It can be chained, so something like this should work: The The environment variables would be output in this style:
|
synfinatic
added a commit
that referenced
this issue
Jul 29, 2023
PowerShell requires a slightly different output of environment variables than bash/zsh/etc. Updated docs to refelect how to use `eval` with PowerShell. Bump to v1.10.0 Fixes: #188
synfinatic
added a commit
that referenced
this issue
Jul 29, 2023
PowerShell requires a slightly different output of environment variables than bash/zsh/etc. Updated docs to refelect how to use `eval` with PowerShell. Bump to v1.10.0 Fixes: #188
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
TL;DR: Windows CommandPrompt & PowerShell have no equivalent of bash's
eval
command so you can't doeval $(aws-sso eval ...)
and have it update the environment variables for the current shell/CommandPrompt.Using
setx
is not viable either.The only way I see to do this right now is to generate a batch script that the user can run and then it would delete itself. But this means we would write the AWS secrets to disk which is violating the basic premise of aws-sso. Need to figure out if there is another way to do this?
The text was updated successfully, but these errors were encountered: