Skip to content
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

Make the value arg optional for set command #394

Closed
wants to merge 3 commits into from

Conversation

praneetloke
Copy link

Fixes #340.

This PR uses the same code as Pulumi CLI to prompt the user for a value if no value is specificed when in interactive mode.

Although I updated the test, I couldn't get it to pass because the pipe command seems to not run correctly? I couldn't quite figure out what is going on and hope that one of you knows how to get the test to pass. FWIW, I built a local version of the CLI and have confirmed it to work with these changes, i.e. I can run echo 'secret' | esc env set <workspace> <path> --secret (as well as without --secret.)

@@ -16,6 +16,8 @@ run: |
esc env get default/test
esc env set default/test password true --secret
esc env get default/test
echo 'mysecret' | esc env set default/test password --secret
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As mentioned in the PR description, I can't get this to work. It's as if echo 'mysecret' evaluates to an empty string because that's what the value of esc env set ... ends up getting. However, building a local version of the CLI and executing the same thing works as expected, so I am not sure what is going on with the test runner.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add option to prompt and mask value when using --secret for pulumi env
1 participant