From 44ae8647093645b2caa3c38f4cef2dfe844f315d Mon Sep 17 00:00:00 2001 From: Wez Furlong Date: Thu, 1 Sep 2022 06:02:16 -0700 Subject: [PATCH] pty: fix build on windows --- pty/src/cmdbuilder.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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)> {