diff --git a/pty/src/cmdbuilder.rs b/pty/src/cmdbuilder.rs index fa6618e8a..46780613f 100644 --- a/pty/src/cmdbuilder.rs +++ b/pty/src/cmdbuilder.rs @@ -591,14 +591,14 @@ impl CommandBuilder { block } - pub fn get_shell(&self) -> anyhow::Result { + pub fn get_shell(&self) -> String { let exe: OsString = self .get_env("ComSpec") .unwrap_or(OsStr::new("cmd.exe")) .into(); - Ok(exe + exe .into_string() - .unwrap_or_else(|_| "%CompSpec%".to_string())) + .unwrap_or_else(|_| "%CompSpec%".to_string()) } pub(crate) fn cmdline(&self) -> anyhow::Result<(Vec, Vec)> {