Updated command piping to allow for interactive shell
This commit is contained in:
parent
c11fc482ef
commit
9a22c117b5
|
@ -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(())
|
||||
|
|
Loading…
Reference in New Issue