MCPcopy Create free account
hub / github.com/f0rr0/oliphaunt / command_for_host

Function command_for_host

xtask/src/main.rs:9790–9803  ·  view source on GitHub ↗
(command: &str)

Source from the content-addressed store, hash-verified

9788}
9789
9790fn 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)]
9806fn windows_bash_path() -> PathBuf {

Callers 3

run_in_release_workspaceFunction · 0.85
runFunction · 0.85
run_validate_scriptFunction · 0.85

Calls 3

windows_bash_pathFunction · 0.85
argMethod · 0.80
extensionMethod · 0.45

Tested by

no test coverage detected