From d2d0bacafdcd22543162b7e09be5e28bc9cbce06 Mon Sep 17 00:00:00 2001 From: Sridhar Ratnakumar Date: Mon, 10 Apr 2023 20:39:17 -0400 Subject: [PATCH] Force creation of symlink --- modules/pre-commit.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/pre-commit.nix b/modules/pre-commit.nix index a8685aeb..24cf66b8 100644 --- a/modules/pre-commit.nix +++ b/modules/pre-commit.nix @@ -402,7 +402,7 @@ in echo 1>&2 " 2. remove .pre-commit-config.yaml" echo 1>&2 " 3. add .pre-commit-config.yaml to .gitignore" else - ln -s ${configFile} "''${GIT_WC}/.pre-commit-config.yaml" + ln -fs ${configFile} "''${GIT_WC}/.pre-commit-config.yaml" # Remove any previously installed hooks (since pre-commit itself has no convergent design) hooks="pre-commit pre-merge-commit pre-push prepare-commit-msg commit-msg post-checkout post-commit" for hook in $hooks; do