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 <<<"); |     println!(">>> Activating environment <<<"); | ||||||
|     let generation = env::var("NIXGREETY_GENERATION").unwrap(); |     let generation = env::var("NIXGREETY_GENERATION").unwrap(); | ||||||
|     Command::new(format!("{}/activate", generation)) |     Command::new(format!("{}/activate", generation)) | ||||||
|         .stdout(Stdio::inherit()) |         .status() | ||||||
|         .output() |  | ||||||
|         .expect("Failed to activate environment"); |         .expect("Failed to activate environment"); | ||||||
| 
 | 
 | ||||||
|     println!(">>> Creating session <<<"); |     println!(">>> Creating session <<<"); | ||||||
|     Command::new(format!("{}/session/init", generation)) |     Command::new(format!("{}/session/init", generation)) | ||||||
|         .stdout(Stdio::inherit()) |         .status() | ||||||
|         .output() |  | ||||||
|         .expect("Failed to create session"); |         .expect("Failed to create session"); | ||||||
| 
 | 
 | ||||||
|     println!(">>> Deactivating environment <<<"); |     println!(">>> Deactivating environment <<<"); | ||||||
| @ -48,8 +46,7 @@ pub fn handle_session() -> io::Result<()> { | |||||||
|         .map(|entry| entry.path()) |         .map(|entry| entry.path()) | ||||||
|         .unwrap_or(PathBuf::from("")); |         .unwrap_or(PathBuf::from("")); | ||||||
|     Command::new(format!("{}/activate", generation.display())) |     Command::new(format!("{}/activate", generation.display())) | ||||||
|         .stdout(Stdio::inherit()) |         .status() | ||||||
|         .output() |  | ||||||
|         .unwrap(); |         .unwrap(); | ||||||
| 
 | 
 | ||||||
|     Ok(()) |     Ok(()) | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Jan-Bulthuis
						Jan-Bulthuis