MCPcopy Create free account
hub / github.com/GCWing/BitFun / create_command

Function create_command

src/crates/services/services-core/src/process_manager.rs:92–104  ·  view source on GitHub ↗

Create synchronous Command (Windows automatically adds CREATE_NO_WINDOW)

(program: S)

Source from the content-addressed store, hash-verified

90
91/// Create synchronous Command (Windows automatically adds CREATE_NO_WINDOW)
92pub fn create_command<S: AsRef<std::ffi::OsStr>>(program: S) -> Command {
93 let cmd = Command::new(program.as_ref());
94
95 #[cfg(windows)]
96 {
97 let mut cmd = cmd;
98 cmd.creation_flags(CREATE_NO_WINDOW);
99 cmd
100 }
101
102 #[cfg(not(windows))]
103 cmd
104}
105
106/// Create Tokio async Command (Windows automatically adds CREATE_NO_WINDOW)
107pub fn create_tokio_command<S: AsRef<std::ffi::OsStr>>(program: S) -> TokioCommand {

Callers 15

reveal_in_explorerFunction · 0.50
open_appMethod · 0.50
get_git_diffMethod · 0.50
build_commandMethod · 0.50
open_app_shellMethod · 0.50
open_urlMethod · 0.50
open_fileMethod · 0.50
read_os_versionFunction · 0.50
hostnameFunction · 0.50
git_stdout_lenientFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected