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

Please support --preserve-env as an alias for -E #21

Open
Tracked by #4
joshtriplett opened this issue Feb 9, 2024 · 5 comments
Open
Tracked by #4

Please support --preserve-env as an alias for -E #21

joshtriplett opened this issue Feb 9, 2024 · 5 comments
Labels
Issue-Bug Something isn't working Resolution-Fix-Committed Fix is checked in, but it might be 3-4 weeks until a release. Tracking-External This bug isn't resolved, but it's following an external workitem.

Comments

@joshtriplett
Copy link

joshtriplett commented Feb 9, 2024

In sudo for Linux, the long option name for -E is --preserve-env; please support that as the long version of -E.

--preserve-env additionally accepts an optional list of environment variables, to only preserve those variables rather than the entire environment.

@gerardog
Copy link

gerardog commented Feb 9, 2024

How is that different with the current -E option?

image

@joshtriplett joshtriplett changed the title Consider supporting -E/--preserve-env Please support --preserve-env as an alias for -E Feb 9, 2024
@joshtriplett
Copy link
Author

joshtriplett commented Feb 9, 2024

@gerardog That wasn't mentioned in the documentation at https://learn.microsoft.com/en-us/windows/sudo/ , so I didn't know it was supported. I've corrected this issue to just request --preserve-env and the optional list of environment variables. Thank you!

@zadjii-msft zadjii-msft added the Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting label Feb 9, 2024
@zadjii-msft
Copy link
Member

zadjii-msft commented Feb 9, 2024

Yep it was a total brainfart to not name it the same thing. Fortunately, this is super easy for us to fix, thanks!

MSFT:48926819 internally

@zadjii-msft zadjii-msft added Issue-Bug Something isn't working Tracking-External This bug isn't resolved, but it's following an external workitem. labels Feb 9, 2024
@joadoumie joadoumie removed the Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting label Feb 14, 2024
@zadjii-msft
Copy link
Member

Merged to OS in !10282477, which was OS.2020 commit 91ba4484. Thanks!

@zadjii-msft zadjii-msft added the Resolution-Fix-Committed Fix is checked in, but it might be 3-4 weeks until a release. label Feb 15, 2024
@joshtriplett
Copy link
Author

@zadjii-msft Thank you! Does that include --preserve-env=VAR1,VAR2, in addition to renaming the long option?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Bug Something isn't working Resolution-Fix-Committed Fix is checked in, but it might be 3-4 weeks until a release. Tracking-External This bug isn't resolved, but it's following an external workitem.
Projects
None yet
Development

No branches or pull requests

4 participants