mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 07:35:42 +02:00
Remove no-longer-needed convert_env_values calls (#14681)
# Description Takes advantage of #14591 to remove the now-necessary calls to `convert_env_values()` that I added in #14249. The function is now just called once to convert `PATH`. Also removed the Windows-build-time checks for `ensure_path`, since previous case-insensitivity fixes make this unnecessary as well. # User-Facing Changes None - #14591 now handles conversion 'on-demand'. # Tests + Formatting - 🟢 `toolkit fmt` - 🟢 `toolkit clippy` - 🟢 `toolkit test` - 🟢 `toolkit test stdlib` # After Submitting N/A
This commit is contained in:
@ -89,22 +89,7 @@ pub fn convert_env_values(engine_state: &mut EngineState, stack: &Stack) -> Resu
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(not(windows))]
|
||||
{
|
||||
error = error.or_else(|| ensure_path(&mut new_scope, "PATH"));
|
||||
}
|
||||
|
||||
#[cfg(windows)]
|
||||
{
|
||||
let first_result = ensure_path(&mut new_scope, "Path");
|
||||
if first_result.is_some() {
|
||||
let second_result = ensure_path(&mut new_scope, "PATH");
|
||||
|
||||
if second_result.is_some() {
|
||||
error = error.or(first_result);
|
||||
}
|
||||
}
|
||||
}
|
||||
error = error.or_else(|| ensure_path(&mut new_scope, "PATH"));
|
||||
|
||||
if let Ok(last_overlay_name) = &stack.last_overlay_name() {
|
||||
if let Some(env_vars) = Arc::make_mut(&mut engine_state.env_vars).get_mut(last_overlay_name)
|
||||
|
Reference in New Issue
Block a user