(run_id: &str)
| 744 | } |
| 745 | |
| 746 | fn validate_run_id(run_id: &str) -> CliResult<()> { |
| 747 | if run_id.is_empty() |
| 748 | || run_id.contains("..") |
| 749 | || run_id.contains('/') |
| 750 | || run_id.contains('\\') |
| 751 | || run_id.contains('\0') |
| 752 | { |
| 753 | return Err(CliError::InvalidArgument { |
| 754 | message: format!("invalid run id '{}'", run_id), |
| 755 | }); |
| 756 | } |
| 757 | Ok(()) |
| 758 | } |
| 759 | |
| 760 | fn canonicalize_lenient(path: &Path) -> PathBuf { |
| 761 | path.canonicalize().unwrap_or_else(|_| path.to_path_buf()) |
no test coverage detected