MCPcopy Create free account
hub / github.com/ScriptedAlchemy/tracedecay / hook_command_for_platform

Function hook_command_for_platform

src/agents/mod.rs:872–883  ·  view source on GitHub ↗
(
    tracedecay_bin: &str,
    subcommand: &str,
    windows: bool,
)

Source from the content-addressed store, hash-verified

870}
871
872pub(crate) fn hook_command_for_platform(
873 tracedecay_bin: &str,
874 subcommand: &str,
875 windows: bool,
876) -> String {
877 let quoted = if windows {
878 quote_windows_command_arg(&normalize_path_separators(tracedecay_bin))
879 } else {
880 quote_posix_command_arg(tracedecay_bin)
881 };
882 format!("{quoted} {subcommand}")
883}
884
885fn quote_windows_command_arg(value: &str) -> String {
886 format!("\"{}\"", value.replace('"', "\\\""))

Calls 3

quote_posix_command_argFunction · 0.85