MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / shell_quote

Function shell_quote

atomic-cli/src/commands/git/hooks.rs:363–371  ·  view source on GitHub ↗
(path: &Path)

Source from the content-addressed store, hash-verified

361}
362
363fn shell_quote(path: &Path) -> io::Result<String> {
364 let value = path.to_str().ok_or_else(|| {
365 io::Error::new(
366 ErrorKind::InvalidData,
367 "the Atomic binary path is not valid UTF-8 and cannot be embedded in a Git hook",
368 )
369 })?;
370 Ok(format!("'{}'", value.replace('\'', "'\\''")))
371}
372
373pub(super) fn print_unmanaged_instructions(reason: &str, binary: &Path) -> CliResult<()> {
374 let command = integration_command(binary).map_err(|error| {

Callers 2

dispatcher_scriptFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected