aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLarry Shaffer2013-12-07 23:36:44 -0700
committerMike McQuaid2013-12-09 10:24:13 +0000
commit6697ff6c9d0d4301adfbb7c76628808a63f1324b (patch)
tree1a66c6c223baae3cc9bd5c395d03928f4baa774d
parentd20f5f9d62295284e0d83b14b628604abf065b91 (diff)
downloadhomebrew-6697ff6c9d0d4301adfbb7c76628808a63f1324b.tar.bz2
brew-bundle: exit on command failure
Closes #25053. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
-rwxr-xr-xLibrary/Contributions/cmd/brew-bundle.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/Library/Contributions/cmd/brew-bundle.rb b/Library/Contributions/cmd/brew-bundle.rb
index f0ce85d38..0a9ce1ebc 100755
--- a/Library/Contributions/cmd/brew-bundle.rb
+++ b/Library/Contributions/cmd/brew-bundle.rb
@@ -30,10 +30,11 @@ end
raise "Cannot find Brewfile#{error}" unless File.exist? path
-File.readlines(path).each do |line|
+File.readlines(path).each_with_index do |line, index|
command = line.chomp
next if command.empty?
next if command.chars.first == '#'
- system "brew #{command}"
+ brew_cmd = "brew #{command}"
+ odie "Command failed: L#{index+1}:#{brew_cmd}" unless system brew_cmd
end