(reason: &str, binary: &Path)
| 371 | } |
| 372 | |
| 373 | pub(super) fn print_unmanaged_instructions(reason: &str, binary: &Path) -> CliResult<()> { |
| 374 | let command = integration_command(binary).map_err(|error| { |
| 375 | git_error(format!( |
| 376 | "cannot format hook integration instructions: {error}" |
| 377 | )) |
| 378 | })?; |
| 379 | print_warning(reason); |
| 380 | print_info("Add this advisory command to the existing post-checkout hook or hook manager:"); |
| 381 | print_info(&format!(" {command}")); |
| 382 | Ok(()) |
| 383 | } |
| 384 | |
| 385 | fn install_or_refresh_dispatcher(path: &Path, script: &str) -> io::Result<DispatcherInstall> { |
| 386 | let metadata = match fs::symlink_metadata(path) { |
no test coverage detected