Skip to content

Commit 644160f

Browse files
marc1nekohl
authored andcommitted
Fix check:git_ignore rake task for git >= 2.32.0
Since git 2.32.0, the task check:git_ignore failed with an error message: "fatal: ls-files -i must be used with either -o or -c". Fixed by adding `--cached` option to `git ls-files`.
1 parent 0529fde commit 644160f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/puppetlabs_spec_helper/rake_tasks.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@
323323

324324
desc 'Fails if directories contain the files specified in .gitignore'
325325
task :git_ignore do
326-
matched = `git ls-files --ignored --exclude-standard`
326+
matched = `git ls-files --ignored --exclude-standard --cached`
327327
unless matched == ''
328328
puts matched
329329
raise 'File specified in .gitignore has been committed'

0 commit comments

Comments
 (0)