(path: &str, default: &str)
| 479 | })?; |
| 480 | let file_name = canonical.file_name().ok_or_else(|| { |
| 481 | CliError::Usage(format!("`{input}` does not name a regular input file")) |
| 482 | })?; |
| 483 | (parent.to_path_buf(), PathBuf::from(file_name)) |
| 484 | } |
| 485 | } else { |
| 486 | (cwd, PathBuf::from(input)) |
| 487 | }; |
| 488 | let text = relative.to_string_lossy().replace('\\', "/"); |
| 489 | let vpath = VPath::parse(&text) |
| 490 | .map_err(|err| CliError::Usage(format!("invalid workspace path: {err}")))?; |
| 491 | Ok((NativeFs::open(root)?, vpath)) |
no outgoing calls
no test coverage detected