mirror of
https://github.com/nushell/nushell.git
synced 2025-08-10 12:18:07 +02:00
Switch to using subprocess::shell (#1264)
* Switch to using `shell` Switch to using the shell for subprocess to enable more natural shelling out. * Update external.rs * This is a test with .shell() for external * El pollo loco's PR * co co co * Attempt to fix windows * Fmt * Less is more? Co-authored-by: Andrés N. Robalino <andres@androbtech.com>
This commit is contained in:
@ -14,6 +14,16 @@ pub fn pipeline(commands: &str) -> String {
|
||||
.to_string()
|
||||
}
|
||||
|
||||
pub fn shell_os_paths() -> Vec<std::path::PathBuf> {
|
||||
let mut original_paths = vec![];
|
||||
|
||||
if let Some(paths) = std::env::var_os("PATH") {
|
||||
original_paths = std::env::split_paths(&paths).collect::<Vec<_>>();
|
||||
}
|
||||
|
||||
original_paths
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::pipeline;
|
||||
|
Reference in New Issue
Block a user