MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / value_is_explicit_local_path

Function value_is_explicit_local_path

crates/openshell-cli/src/run.rs:2480–2487  ·  view source on GitHub ↗
(value: &str)

Source from the content-addressed store, hash-verified

2478}
2479
2480fn value_is_explicit_local_path(value: &str) -> bool {
2481 let path = Path::new(value);
2482 path.is_absolute()
2483 || matches!(value, "." | "..")
2484 || value.starts_with("./")
2485 || value.starts_with("../")
2486 || value.starts_with("~/")
2487}
2488
2489fn value_looks_like_bare_dockerfile_name(value: &str) -> bool {
2490 !value.contains('/') && !value.contains(':') && filename_looks_like_dockerfile(Path::new(value))

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected