Skip to content

Commit 3842aa6

Browse files
authored
Merge pull request #6 from mattlqx/cookbook-metadata
fix false return from metadata walk
2 parents c74a6a5 + a1e5af1 commit 3842aa6

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ To check Chef cookbook version bumps, use the `chef-cookbook-version` hook. Each
1515
To unit test Ruby changes in your repo, use the `rspec` hook. Each path in your repo with a `spec` directory should have a `Gemfile` that includes your desired version of rspec (or a derivative library). It will be installed via Bundler prior to testing. Rspec will only be run against the closest directory in a changed file's path with a spec dir.
1616

1717
- repo: https://github.com/mattlqx/pre-commit-ruby
18-
rev: v1.2.4
18+
rev: v1.2.5
1919
hooks:
2020
- id: rubocop
2121
- id: foodcritic

bin/cookbook-wrapper.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ def method_missing(sym, *args, &_block) # rubocop:disable Metrics/AbcSize, Style
8585
changed_cookbooks = []
8686
ARGV.each do |file|
8787
cookbook, type = metadata_walk(file)
88-
next if changed_cookbooks.map(&:first).include?(cookbook)
88+
next if cookbook == false || changed_cookbooks.map(&:first).include?(cookbook)
8989

9090
changed_cookbooks << [cookbook, type] if bump_required?(file)
9191
end

0 commit comments

Comments
 (0)