fix(custom): Fix fallback shell not working on macOS (#1402)

Have switched the fallback shell used when the custom module can't use
the default to use `/usr/bin/env sh` rather than `/bin/env` since
`/usr/bin/env` is more commonly available.
This commit is contained in:
Thomas O'Donnell 2020-06-28 21:41:05 +02:00 committed by GitHub
parent aa8ec60701
commit 6e289721d4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -106,10 +106,10 @@ fn shell_command(cmd: &str, shell_args: &[&str]) -> Option<Output> {
Err(err) => {
log::trace!("Error executing command: {:?}", err);
log::debug!(
"Could not launch command with given shell or STARSHIP_SHELL env variable, retrying with /bin/env sh"
"Could not launch command with given shell or STARSHIP_SHELL env variable, retrying with /usr/bin/env sh"
);
Command::new("/bin/env")
Command::new("/usr/bin/env")
.arg("sh")
.stdin(Stdio::piped())
.stdout(Stdio::piped())