-
Notifications
You must be signed in to change notification settings - Fork 104
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
Bosh env unset #520
Bosh env unset #520
Conversation
We have created an issue in Pivotal Tracker to manage this. Unfortunately, the Pivotal Tracker project is private so you may be unable to view the contents of the story. The labels on this github issue will be updated when the story is started. |
Unfortunately, I haven't been able to test the Powershell aspect manually. I do see evidence that it will work based on this stack overflow question, though: https://stackoverflow.com/questions/50064358/setting-environment-variables-to-an-empty-string-in-powershell |
Some functionality tests:
I have a couple of minor concerns I'm going to look into a little more.
What are the values of |
Ah, I'm just not using an ssh key, so that value wasn't set. |
If you're using the It looks like |
commands/bosh_environment.go
Outdated
@@ -91,6 +92,10 @@ func (be BoshEnvironment) Execute(args []string) error { | |||
} | |||
|
|||
variables := make(map[string]string) | |||
unsetVariables := []string{ | |||
"BOSH_ALL_PROXY", |
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.
See comment in Conversation. This seems like a potential problem if you are only unsetting credhub or bosh vars.
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.
I'll respond in the conversation about them.
When I was thinking through the user experience, It seemed unlikely the user would want to provide a ssh key when unsetting the variables. I moved them out of the ssh key flag check in order to do that, but I didn't think through the case you mentioned where it unsets both no matter what. I should probably just wrap them in the flag checks, but I wanted to see what you thought. Do you think it should behave the same way that |
Just respect the |
… are set or no vars are set
Ok, I made the change and ran the tests! |
looks good to me! Thanks for the quick fixes. merging, and will update the changelog
|
Resolves #457