If curl fails propagate its exit status through the pipe

This commit is contained in:
Max Howell 2010-09-23 08:54:43 +01:00
parent bdbb8dc2a4
commit a721e736c5

View File

@ -125,7 +125,8 @@ end
Dir.chdir "/usr/local" do Dir.chdir "/usr/local" do
ohai "Downloading and Installing Homebrew..." ohai "Downloading and Installing Homebrew..."
# -m to stop tar erroring out if it can't modify the mtime for root owned directories # -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 end
ohai "Installation successful!" ohai "Installation successful!"