rust-shell-script / rust_cmd_lib

Common rust command-line macros and utilities, to write shell-script like tasks in a clean, natural and rusty way
https://docs.rs/cmd_lib/
Apache License 2.0
1.05k stars 37 forks source link

How can one spawn a process without opening up a window? #41

Open amitka-rnd opened 2 years ago

amitka-rnd commented 2 years ago

I'm compiling my exe with #![cfg_attr(not(debug_assertions), windows_subsystem = "windows")] an issue I've noticed that whenever I trigger a new command it opens up a new window.

I've used Process before where I could've just pass a flag to creation_flags which indicates to not spawn a new window.

is there a solution for cmd_lib?

rust-shell-script commented 2 years ago

I don't have windows dev machine, but I guess to fix it you can just pass extra flags when calling Command::new in process.rs. Patch is also welcome.