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

Function checker

atomic-repository/src/intent_evidence.rs:568–576  ·  view source on GitHub ↗
(script: &str)

Source from the content-addressed store, hash-verified

566
567 #[cfg(unix)]
568 fn checker(script: &str) -> tempfile::TempPath {
569 use std::os::unix::fs::PermissionsExt;
570 let mut file = tempfile::NamedTempFile::new().unwrap();
571 write!(file, "#!/bin/sh\n{script}\n").unwrap();
572 file.as_file()
573 .set_permissions(std::fs::Permissions::from_mode(0o700))
574 .unwrap();
575 file.into_temp_path()
576 }
577
578 #[cfg(unix)]
579 #[test]

Calls 2

unwrapMethod · 0.45
set_permissionsMethod · 0.45