Skip to content

Commit

Permalink
fix checking exit status
Browse files Browse the repository at this point in the history
  • Loading branch information
bibendi committed Feb 26, 2015
1 parent b86bbce commit 7c70898
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/apress/gems/cli.rb
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def check_git
`git rev-parse --abbrev-ref HEAD`.chomp.strip == 'master' || abort('Can be released only from `master` branch')
`git remote | grep upstream`.chomp.strip == 'upstream' || abort('Can be released only with `upstream` remote')
spawn 'git pull upstream master'
spawn 'git pull --tags upstream'
spawn 'git fetch --tags upstream'
spawn 'git push upstream master'
end

Expand Down Expand Up @@ -121,7 +121,7 @@ def spawn(cmd)
::Process.wait pid
end
end
abort "#{cmd} failed" unless $CHILD_STATUS && $CHILD_STATUS.exitstatus == 0
abort "#{cmd} failed, exit code #{$? && $?.exitstatus}" unless $? && $?.exitstatus == 0
end

def load_gemspec
Expand Down

0 comments on commit 7c70898

Please sign in to comment.