From f43b60f97cf1a8df9718fea9838283f3ba2be58a Mon Sep 17 00:00:00 2001 From: Copilot <198982749+Copilot@users.noreply.github.com> Date: Fri, 14 Nov 2025 22:50:42 +0800 Subject: [PATCH] Improve hint to remove `core.hooksPath` (#1074) * Support rootless container (#1018) * Initial plan * Update hint to include both local and global core.hooksPath removal commands Co-authored-by: j178 <10510431+j178@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: j178 <10510431+j178@users.noreply.github.com> --- src/cli/install.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/cli/install.rs b/src/cli/install.rs index 13ade8a6..702c46bb 100644 --- a/src/cli/install.rs +++ b/src/cli/install.rs @@ -35,8 +35,9 @@ pub(crate) async fn install( ) -> Result { if git_dir.is_none() && git::has_hooks_path_set().await? { anyhow::bail!( - "Cowardly refusing to install hooks with `core.hooksPath` set.\nhint: `{}` to fix this", - "git config --unset-all core.hooksPath".cyan() + "Cowardly refusing to install hooks with `core.hooksPath` set.\nhint: Run these commands to remove core.hooksPath:\nhint: {}\nhint: {}", + "git config --unset-all --local core.hooksPath".cyan(), + "git config --unset-all --global core.hooksPath".cyan() ); }