Skip to content

Commit

Permalink
Prevent wsl console window shown (#1850)
Browse files Browse the repository at this point in the history
* Hide wsl command window

* Use the constant from the winapi crate
  • Loading branch information
nazo6 committed May 14, 2023
1 parent 15f1c67 commit 4b3c234
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/bridge/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,11 @@ fn create_platform_shell_command(command: &str, args: &[&str]) -> Option<StdComm
let mut result = StdCommand::new("wsl");
result.args(["$SHELL", "-lc"]);
result.arg(format!("{} {}", command, args.join(" ")));
#[cfg(windows)]
std::os::windows::process::CommandExt::creation_flags(
&mut result,
winapi::um::winbase::CREATE_NO_WINDOW,
);

Some(result)
} else if cfg!(target_os = "macos") {
Expand Down

0 comments on commit 4b3c234

Please sign in to comment.