From 9a22c117b56492111a90aa7f15d2414ee9ffbf8b Mon Sep 17 00:00:00 2001 From: Jan-Bulthuis Date: Sat, 22 Feb 2025 06:05:06 +0100 Subject: [PATCH] Updated command piping to allow for interactive shell --- src/session.rs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/session.rs b/src/session.rs index fb2c024..d603e10 100644 --- a/src/session.rs +++ b/src/session.rs @@ -12,14 +12,12 @@ pub fn handle_session() -> io::Result<()> { println!(">>> Activating environment <<<"); let generation = env::var("NIXGREETY_GENERATION").unwrap(); Command::new(format!("{}/activate", generation)) - .stdout(Stdio::inherit()) - .output() + .status() .expect("Failed to activate environment"); println!(">>> Creating session <<<"); Command::new(format!("{}/session/init", generation)) - .stdout(Stdio::inherit()) - .output() + .status() .expect("Failed to create session"); println!(">>> Deactivating environment <<<"); @@ -48,8 +46,7 @@ pub fn handle_session() -> io::Result<()> { .map(|entry| entry.path()) .unwrap_or(PathBuf::from("")); Command::new(format!("{}/activate", generation.display())) - .stdout(Stdio::inherit()) - .output() + .status() .unwrap(); Ok(())