Skip to content

Commit db8b6f8

Browse files
committed
Fix path to config file when unlinking exisiting config
1 parent f2db059 commit db8b6f8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/pre-commit.nix

+1-1
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,7 @@ in
439439
if ! readlink "''${GIT_WC}/${cfg.configPath}" >/dev/null \
440440
|| [[ $(readlink "''${GIT_WC}/${cfg.configPath}") != ${cfg.configFile} ]]; then
441441
echo 1>&2 "git-hooks.nix: updating $PWD repo"
442-
[ -L ${cfg.configPath} ] && unlink ${cfg.configPath}
442+
[ -L "''${GIT_WC}/${cfg.configPath}" ] && unlink "''${GIT_WC}/${cfg.configPath}"
443443
444444
if [[ -e "''${GIT_WC}/${cfg.configPath}" && ! ${boolToString cfg.overwriteConfig} ]]; then
445445
echo 1>&2 "git-hooks.nix: WARNING: Refusing to install because of an existing config at ${cfg.configPath}"

0 commit comments

Comments
 (0)