test: clear parent envs to prevent leakage to tests (#9976)

Running tests locally from nushell with customizations (i.e.
$env.PROMPT_COMMAND etc) may lead to failing tests as that customization
leaks to the sandboxed nu itself.

Remove `FILE_PWD` from env

# Tests + Formatting

Tests are now passing locally without issue in my case
This commit is contained in:
Kiryl Mialeshka
2023-08-14 12:49:55 +02:00
committed by GitHub
parent 5d94b16d71
commit 6eac9bfd0f
3 changed files with 23 additions and 14 deletions

View File

@ -431,7 +431,7 @@ pub enum ShellError {
#[diagnostic(
code(nu::shell::automatic_env_var_set_manually),
help(
r#"The environment variable '{envvar_name}' is set automatically by Nushell and cannot not be set manually."#
r#"The environment variable '{envvar_name}' is set automatically by Nushell and cannot be set manually."#
)
)]
AutomaticEnvVarSetManually {