MCPcopy Index your code
hub / github.com/NativeScript/SimDeck / current_simdeck_executable_path

Function current_simdeck_executable_path

packages/server/src/main.rs:2257–2272  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2255}
2256
2257fn current_simdeck_executable_path() -> anyhow::Result<PathBuf> {
2258 if let Some(arg0) = env::args_os().next().filter(|value| !value.is_empty()) {
2259 let path = PathBuf::from(arg0);
2260 let candidate = if path.is_absolute() {
2261 path
2262 } else {
2263 env::current_dir()
2264 .context("resolve current directory")?
2265 .join(path)
2266 };
2267 if candidate.exists() {
2268 return Ok(candidate);
2269 }
2270 }
2271 env::current_exe().context("resolve simdeck executable")
2272}
2273
2274fn paths_refer_to_same_file(left: &Path, right: &Path) -> bool {
2275 if left == right {

Callers 3

start_project_serviceFunction · 0.85
mainFunction · 0.85

Calls 1

is_emptyMethod · 0.80

Tested by

no test coverage detected