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

Function checker

atomic-cli/tests/intent_evidence_replay_test.rs:23–30  ·  view source on GitHub ↗
(body: &str)

Source from the content-addressed store, hash-verified

21}
22
23fn checker(body: &str) -> tempfile::TempPath {
24 let mut file = tempfile::NamedTempFile::new().unwrap();
25 write!(file, "#!/bin/sh\nset -e\n{body}\n").unwrap();
26 file.as_file()
27 .set_permissions(std::fs::Permissions::from_mode(0o700))
28 .unwrap();
29 file.into_temp_path()
30}
31
32fn quote(value: &str) -> String {
33 format!("'{}'", value.replace('\'', "'\"'\"'"))

Calls 2

unwrapMethod · 0.45
set_permissionsMethod · 0.45

Tested by

no test coverage detected