Skip to content

Commit 5af65eb

Browse files
committed
Use the correct path when unlinking the exising config
1 parent 1293270 commit 5af65eb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/pre-commit.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,7 @@ in
428428
if ! readlink "''${GIT_WC}/${cfg.configPath}" >/dev/null \
429429
|| [[ $(readlink "''${GIT_WC}/${cfg.configPath}") != ${cfg.configFile} ]]; then
430430
echo 1>&2 "git-hooks.nix: updating $PWD repo"
431-
[ -L ${cfg.configPath} ] && unlink ${cfg.configPath}
431+
[ -L "''${GIT_WC}/${cfg.configPath}" ] && unlink "''${GIT_WC}/${cfg.configPath}"
432432
433433
if [ -e "''${GIT_WC}/${cfg.configPath}" ]; then
434434
echo 1>&2 "git-hooks.nix: WARNING: Refusing to install because of pre-existing ${cfg.configPath}"

0 commit comments

Comments
 (0)