mirror of
https://github.com/nushell/nushell.git
synced 2025-01-03 13:00:08 +01:00
Set empty ENV_CONVERSIONS
record by default (#14566)
# Description With Windows Path case-insensitivity in place, we no longer need an `ENV_CONVERSIONS` for `PATH`, as the `nu_engine::env::convert_env_values()` handles it automatically. This PR: * Removes the default `ENV_CONVERSIONS` for path from `default_env.nu` * Sets `ENV_CONVERSIONS` to an empty record (so it can be `merge`'d) in `main()` instead # User-Facing Changes No behavioral changes - Users will now have an empty `ENV_CONVERSIONS` at startup by default, but the behavior should not change. # Tests + Formatting - 🟢 `toolkit fmt` - 🟢 `toolkit clippy` - 🟢 `toolkit test` - 🟢 `toolkit test stdlib` # After Submitting
This commit is contained in:
parent
035b882db1
commit
7aacad3270
@ -39,10 +39,3 @@ $env.PROMPT_COMMAND_RIGHT = $env.PROMPT_COMMAND_RIGHT? | default {||
|
||||
|
||||
([$last_exit_code, (char space), $time_segment] | str join)
|
||||
}
|
||||
|
||||
$env.ENV_CONVERSIONS = {
|
||||
"PATH": {
|
||||
from_string: { |s| $s | split row (char esep) | path expand --no-symlink }
|
||||
to_string: { |v| $v | path expand --no-symlink | str join (char esep) }
|
||||
}
|
||||
}
|
||||
|
@ -24,7 +24,7 @@ use nu_cli::gather_parent_env_vars;
|
||||
use nu_lsp::LanguageServer;
|
||||
use nu_path::canonicalize_with;
|
||||
use nu_protocol::{
|
||||
engine::EngineState, report_shell_error, ByteStream, Config, IntoValue, PipelineData,
|
||||
engine::EngineState, record, report_shell_error, ByteStream, Config, IntoValue, PipelineData,
|
||||
ShellError, Span, Spanned, Type, Value,
|
||||
};
|
||||
use nu_std::load_standard_library;
|
||||
@ -285,6 +285,11 @@ fn main() -> Result<()> {
|
||||
);
|
||||
perf!("$env.config setup", start_time, use_color);
|
||||
|
||||
engine_state.add_env_var(
|
||||
"ENV_CONVERSIONS".to_string(),
|
||||
Value::test_record(record! {}),
|
||||
);
|
||||
|
||||
start_time = std::time::Instant::now();
|
||||
if let Some(include_path) = &parsed_nu_cli_args.include_path {
|
||||
let span = include_path.span;
|
||||
|
Loading…
Reference in New Issue
Block a user