-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
neither hide nor hide-env seems to hide environment variables from externals #7937
Comments
Any updates? |
I think I've narrowed it down to this line returning nushell/crates/nu-protocol/src/engine/stack.rs Lines 326 to 327 in f4bd78b
|
@fdncred What is the output of your |
# Description This one fixes env not being hidden inside closure, reported in the conversation under #6593 #6593 #7937 still persist. These seems a bit more involved and might need hidden env tracking also in the engine state... I'm not yet sure what's causing it. Also re-enables some env-related tests and removes unused Value clone. # User-Facing Changes Just a bugfix # Tests + Formatting Don't forget to add tests that cover your changes. Make sure you've run and fixed any issues with these commands: - `cargo fmt --all -- --check` to check standard code formatting (`cargo fmt --all` applies these changes) - `cargo clippy --workspace -- -D warnings -D clippy::unwrap_used -A clippy::needless_collect` to check that you're using the standard code style - `cargo test --workspace` to check that all tests pass # After Submitting If your PR had any user-facing changes, update [the documentation](https://github.com/nushell/nushell.github.io) after the PR is merged, if necessary. This will help us keep the docs up to date.
|
I only use this env var on Windows and on Windows by default shell is pwsh. CARGO_TARGET_DIR is set the regular way you set env vars in Windows. I can't remember right now if it's in HKLM or HKCU. But I'm wondering if it has something to do with having a parent shell and inheriting those env vars? |
I can reproduce it on my mac too like this. In fish:
start nushell
now do this
|
Yeah, it might be the inherited env vars... I thought it had to do with multiple overlays but couldn't reproduce it and since you have only one, the problem will be somewhere else. |
What is |
it's an env var that some *nix terminals need to support 24-bit color vs 8-bit. |
similar to #6593 but different examples. |
Describe the bug
I'm trying to hide an environment variable from externals, specifically cargo.
How to reproduce
Expected behavior
Externals shouldn't see a hidden env var
Screenshots
No response
Configuration
Additional context
No response
The text was updated successfully, but these errors were encountered: