Skip to content

Commit 4d94fb3

Browse files
htanataShane da Silva
authored and
Shane da Silva
committed
Return :warn instead of :fail on BundleCheck
When rebasing, returning :fail will abort rebase and the repository ends up with a detached HEAD. Rebase becomes impossible unless you install the needed gems first. Change-Id: I6bc22934554dc4b422398082ccf076de97fd0251 Reviewed-on: http://gerrit.causes.com/35952 Tested-by: jenkins <jenkins@causes.com> Reviewed-by: Shane da Silva <shane@causes.com>
1 parent 36574a3 commit 4d94fb3

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
and commit message body widths
77
* Fix bug where committing a change with only file deletions would result
88
in those changes not being committed
9+
* Warn instead of failing when gem dependencies are out of date in
10+
`BundleCheck` post-checkout hook
911

1012
## 0.6.2
1113

lib/overcommit/hook/post_checkout/bundle_check.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ def run
77
return :warn, 'bundler not installed -- run `gem install bundler`'
88
end
99

10-
return :bad if dependencies_changed? && !dependencies_satisfied?
10+
return :warn if dependencies_changed? && !dependencies_satisfied?
1111

1212
:good
1313
end

spec/overcommit/hook/post_checkout/bundle_check_spec.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
context 'and the dependencies are not satisfied' do
4444
let(:satisfied) { false }
4545

46-
it { should fail_check }
46+
it { should warn }
4747
end
4848
end
4949
end

0 commit comments

Comments
 (0)