()
| 2411 | } |
| 2412 | |
| 2413 | fn project_root() -> anyhow::Result<PathBuf> { |
| 2414 | let mut current = env::current_dir().context("resolve current directory")?; |
| 2415 | loop { |
| 2416 | if current.join(".simdeck").exists() |
| 2417 | || current.join(".git").exists() |
| 2418 | || current.join("package.json").exists() |
| 2419 | || current.join("xcodeproj").exists() |
| 2420 | { |
| 2421 | return Ok(current); |
| 2422 | } |
| 2423 | if !current.pop() { |
| 2424 | return env::current_dir().context("resolve current directory"); |
| 2425 | } |
| 2426 | } |
| 2427 | } |
| 2428 | |
| 2429 | fn choose_service_port_for_bind(preferred: u16, bind: IpAddr) -> anyhow::Result<u16> { |
| 2430 | let port = preferred.max(1024); |
no outgoing calls
no test coverage detected