(command: &str)
| 9788 | } |
| 9789 | |
| 9790 | fn command_for_host(command: &str) -> Command { |
| 9791 | if cfg!(windows) |
| 9792 | && Path::new(command) |
| 9793 | .extension() |
| 9794 | .and_then(|ext| ext.to_str()) |
| 9795 | .is_some_and(|ext| ext.eq_ignore_ascii_case("sh")) |
| 9796 | { |
| 9797 | let mut shell = Command::new(windows_bash_path()); |
| 9798 | shell.arg("--noprofile").arg("--norc"); |
| 9799 | shell.arg(command); |
| 9800 | return shell; |
| 9801 | } |
| 9802 | Command::new(command) |
| 9803 | } |
| 9804 | |
| 9805 | #[cfg(windows)] |
| 9806 | fn windows_bash_path() -> PathBuf { |
no test coverage detected