jish / pre-commit

A slightly improved pre-commit hook for git
https://jish.github.io/pre-commit/
Other
796 stars 96 forks source link

Windows safe filenames. #242

Closed jish closed 7 years ago

jish commented 7 years ago

cf. https://github.com/jish/pre-commit/issues/241 cc: @mpapis @rlgreen91

In our template directory we were using ERB tags for filenames. These filenames do not behave well in Windows environments. Instead of using ERB replacement we are using simple token substitution.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+1.005%) to 97.26% when pulling 82bc8967a2d590d5bfbdf79054b23764723ef63e on windows_safe_filenames into 32921936f96779d851bc9a02d2693bc310856217 on master.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+1.007%) to 97.263% when pulling 824ceb640818bf587cc2b55a4b00eeaa16da0dbb on windows_safe_filenames into 32921936f96779d851bc9a02d2693bc310856217 on master.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+1.005%) to 97.26% when pulling 4493b899c2d0f1841946319417e46ec02450ddba on windows_safe_filenames into 32921936f96779d851bc9a02d2693bc310856217 on master.

mpapis commented 7 years ago

sorry for late answer, jest this is a good fix, my guess is that %...% could be confused with dos variable evaluation, but I did not got chance to prove that, anyway this should fix it