Skip to content

Commit d34279a

Browse files
jawshooahsds
authored andcommitted
Check that script starts with '.\' on Windows
1 parent 690373f commit d34279a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/overcommit/hook_signer.rb

+2-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ def hook_path
4949
end
5050

5151
def signable_file?(file)
52-
file.start_with?(".#{File::SEPARATOR}") &&
52+
sep = Overcommit::OS.windows? ? '\\' : File::SEPARATOR
53+
file.start_with?(".#{sep}") &&
5354
Overcommit::GitRepo.tracked?(file)
5455
end
5556

0 commit comments

Comments
 (0)