mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 08:06:03 +02:00
Revert "fix: make exec command decrement SHLVL correctly" (#14580)
Reverts nushell/nushell#14570
This commit is contained in:
@ -325,7 +325,7 @@ fn main() -> Result<()> {
|
||||
if engine_state.is_interactive {
|
||||
let mut shlvl = engine_state
|
||||
.get_env_var("SHLVL")
|
||||
.map(|x| x.as_int().unwrap_or(0))
|
||||
.map(|x| x.as_str().unwrap_or("0").parse::<i64>().unwrap_or(0))
|
||||
.unwrap_or(0);
|
||||
shlvl += 1;
|
||||
engine_state.add_env_var("SHLVL".to_string(), Value::int(shlvl, Span::unknown()));
|
||||
|
Reference in New Issue
Block a user