We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7880c89 commit 025fa29Copy full SHA for 025fa29
lib/create_github_release/assertions/local_release_branch_does_not_exist.rb
@@ -31,10 +31,12 @@ class LocalReleaseBranchDoesNotExist < AssertionBase
31
def assert
32
print "Checking that local branch ' #{options.branch}' does not exist..."
33
34
- if `git branch --list '#{options.branch}' | wc -l`.to_i.zero? && $CHILD_STATUS.success?
+ branch_count = `git branch --list '#{options.branch}' | wc -l`.to_i
35
+ error 'Could not list branches' unless $CHILD_STATUS.success?
36
+
37
+ if branch_count.zero?
38
puts 'OK'
39
else
- error 'Could not list branches' unless $CHILD_STATUS.success?
40
error "'#{options.branch}' already exists."
41
end
42
0 commit comments