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

Fix hidden env vars not being hidden in closures #8055

Merged
merged 5 commits into from
Feb 12, 2023

Conversation

kubouch
Copy link
Contributor

@kubouch kubouch commented Feb 12, 2023

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 after the PR is merged, if necessary. This will help us keep the docs up to date.

@codecov
Copy link

codecov bot commented Feb 12, 2023

Codecov Report

Base: 55.24% // Head: 55.71% // Increases project coverage by +0.47% 🎉

Coverage data is based on head (b50b064) compared to base (2894668).
Patch coverage: 88.88% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8055      +/-   ##
==========================================
+ Coverage   55.24%   55.71%   +0.47%     
==========================================
  Files         606      604       -2     
  Lines       99060    97500    -1560     
==========================================
- Hits        54721    54324     -397     
+ Misses      44339    43176    -1163     
Impacted Files Coverage Δ
crates/nu-protocol/src/engine/stack.rs 75.83% <87.50%> (ø)
crates/nu-command/src/core_commands/hide_env.rs 90.90% <100.00%> (ø)
crates/nu-utils/src/utils.rs 45.33% <0.00%> (-9.34%) ⬇️
crates/nu-path/src/helpers.rs 75.00% <0.00%> (-9.22%) ⬇️
crates/nu-utils/src/locale.rs 95.00% <0.00%> (-5.00%) ⬇️
crates/nu-command/src/path/expand.rs 79.59% <0.00%> (-4.02%) ⬇️
crates/nu-engine/src/env.rs 51.96% <0.00%> (-2.51%) ⬇️
crates/nu-command/src/path/join.rs 76.71% <0.00%> (-2.14%) ⬇️
crates/nu-command/src/filesystem/cd_query.rs 52.36% <0.00%> (-1.98%) ⬇️
crates/nu-command/src/path/exists.rs 89.18% <0.00%> (-1.72%) ⬇️
... and 26 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@kubouch kubouch added this pull request to the merge queue Feb 12, 2023
Merged via the queue into nushell:main with commit b0775b3 Feb 12, 2023
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.

None yet

1 participant