pty: fix build on windows

This commit is contained in:
Wez Furlong committed 2022-09-01 06:02:16 -07:00
1 parent c0a841eecb
commit 44ae864709
1 file changed
+3 -3
+3 -3
View File
@@ -591,14 +591,14 @@ impl CommandBuilder {
block
}
pub fn get_shell(&self) -> anyhow::Result<String> {
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<u16>, Vec<u16>)> {