From 6e07fc5b9a3ddb8f8ea8b4e471aa29dc37022c0f Mon Sep 17 00:00:00 2001 From: Wez Furlong Date: Wed, 6 Apr 2022 18:42:56 -0700 Subject: [PATCH] fix win32 build 6cad4c35e90306715b311761aebccd63cfe944da calls get_shell, but that isn't available on windows... it is now. --- pty/src/cmdbuilder.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pty/src/cmdbuilder.rs b/pty/src/cmdbuilder.rs index ed93a86b8..837d325f5 100644 --- a/pty/src/cmdbuilder.rs +++ b/pty/src/cmdbuilder.rs @@ -438,6 +438,14 @@ impl CommandBuilder { block } + pub fn get_shell(&self) -> anyhow::Result { + Ok(self + .get_env("ComSpec") + .unwrap_or(OsStr::new("cmd.exe")) + .into() + .into_string()?) + } + pub(crate) fn cmdline(&self) -> anyhow::Result<(Vec, Vec)> { let mut cmdline = Vec::::new();