diff --git a/src/cli.rs b/src/cli.rs index 1aedf1b152..24e654da34 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -217,8 +217,6 @@ impl std::ops::Try for LineResult { async fn process_line(readline: Result, ctx: &mut Context) -> LineResult { match &readline { - Ok(line) if line.trim() == "exit" => LineResult::Break, - Ok(line) if line.trim() == "" => LineResult::Success(line.clone()), Ok(line) => { diff --git a/src/commands/classified.rs b/src/commands/classified.rs index 75e3877eff..fcd9586f2d 100644 --- a/src/commands/classified.rs +++ b/src/commands/classified.rs @@ -135,7 +135,11 @@ impl InternalCommand { futures::future::ready(None) } CommandAction::Exit => { - let _ = env.lock().unwrap().pop(); + let mut v = env.lock().unwrap(); + if v.len() == 1 { + std::process::exit(0); + } + v.pop(); futures::future::ready(None) } },