aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Howell2010-09-23 08:54:43 +0100
committerMax Howell2012-03-09 12:09:38 +0000
commita721e736c595e276d215fd35a2e056010765d081 (patch)
tree9243182beb5683ed4070ac4456365a5516f3b0e0
parentbdbb8dc2a4fbbf93c93d680837b91ebc7ac94231 (diff)
downloadbrew-a721e736c595e276d215fd35a2e056010765d081.tar.bz2
If curl fails propagate its exit status through the pipe
-rw-r--r--install_homebrew.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/install_homebrew.rb b/install_homebrew.rb
index b0740572b..28a8fa812 100644
--- a/install_homebrew.rb
+++ b/install_homebrew.rb
@@ -125,7 +125,8 @@ end
Dir.chdir "/usr/local" do
ohai "Downloading and Installing Homebrew..."
# -m to stop tar erroring out if it can't modify the mtime for root owned directories
- system "/usr/bin/curl -sSfL http://github.com/mxcl/homebrew/tarball/master | /usr/bin/tar xz -m --strip 1"
+ # pipefail to cause the exit status from curl to propogate if it fails
+ system "/bin/bash -o pipefail -c '/usr/bin/curl -sSfL http://github.com/mxcl/homebrew/tarball/master | /usr/bin/tar xz -m --strip 1'"
end
ohai "Installation successful!"