Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion lib/puppetlabs_spec_helper/rake_tasks.rb
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,9 @@

desc 'Fails if directories contain the files specified in .gitignore'
task :git_ignore do
matched = `git ls-files --ignored --exclude-standard`
matched = `git ls-files --ignored --exclude-standard --cached`
raise 'git ls-files failed' unless $CHILD_STATUS.success?

unless matched == ''
puts matched
raise 'File specified in .gitignore has been committed'
Expand Down