diff options
| author | Mike McQuaid | 2013-11-16 20:39:12 +0000 |
|---|---|---|
| committer | Mike McQuaid | 2013-11-16 20:39:12 +0000 |
| commit | ed7693cecf677a5e55a450be2065168e4ebefdb7 (patch) | |
| tree | dd0f557f902a0305545a723970f985aa82b53287 /Library | |
| parent | 674d041d804be070c5a6836ae03ce573c68ece84 (diff) | |
| download | brew-ed7693cecf677a5e55a450be2065168e4ebefdb7.tar.bz2 | |
brew-pull: run `git am --abort` on failure.
Diffstat (limited to 'Library')
| -rwxr-xr-x | Library/Contributions/cmd/brew-pull.rb | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/Library/Contributions/cmd/brew-pull.rb b/Library/Contributions/cmd/brew-pull.rb index 0bdcac79a..ee20e7720 100755 --- a/Library/Contributions/cmd/brew-pull.rb +++ b/Library/Contributions/cmd/brew-pull.rb @@ -48,7 +48,7 @@ ARGV.named.each do|arg| revision = `git rev-parse --short HEAD`.strip ohai 'Applying patch' - patch_args = ['am'] + patch_args = [] patch_args << '--signoff' unless ARGV.include? '--clean' # Normally we don't want whitespace errors, but squashing them can break # patches so an option is provided to skip this step. @@ -59,7 +59,12 @@ ARGV.named.each do|arg| end patch_args << patchpath - safe_system 'git', *patch_args + begin + safe_system 'git', 'am', *patch_args + rescue => e + system 'git', 'am', '--abort' + odie 'Patch failed to apply: aborted.' + end issue = arg.to_i > 0 ? arg.to_i : url_match[4] if issue and not ARGV.include? '--clean' |
