mirror of
https://github.com/nushell/nushell.git
synced 2024-11-21 16:03:19 +01:00
Remove SHLVL update platform limit
This commit is contained in:
parent
4874a02279
commit
06b5dd8f89
17
src/main.rs
17
src/main.rs
@ -281,16 +281,13 @@ fn main() -> Result<()> {
|
||||
);
|
||||
|
||||
// Add SHLVL if interactive
|
||||
#[cfg(not(windows))]
|
||||
{
|
||||
if engine_state.is_interactive {
|
||||
let mut shlvl = engine_state
|
||||
.get_env_var("SHLVL")
|
||||
.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()));
|
||||
}
|
||||
if engine_state.is_interactive {
|
||||
let mut shlvl = engine_state
|
||||
.get_env_var("SHLVL")
|
||||
.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()));
|
||||
}
|
||||
|
||||
if parsed_nu_cli_args.no_std_lib.is_none() {
|
||||
|
Loading…
Reference in New Issue
Block a user