Skip to content

Commit

Permalink
Use -e to check for .git instead of -f
Browse files Browse the repository at this point in the history
  • Loading branch information
cpcloud committed Nov 20, 2022
1 parent 0c9555d commit c5d3fa0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/pre-commit.nix
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ in
if ! type -t git >/dev/null; then
# This happens in pure shells, including lorri
echo 1>&2 "WARNING: pre-commit-hooks.nix: git command not found; skipping installation."
elif [[ ! -f .git ]]; then
elif [[ ! -e .git ]]; then
echo 1>&2 "WARNING: pre-commit-hooks.nix: .git not found; skipping installation."
else
# These update procedures compare before they write, to avoid
Expand Down

0 comments on commit c5d3fa0

Please sign in to comment.