mirror of
https://github.com/gosticks/brew.git
synced 2026-08-16 22:50:18 +00:00
use odie when commands encounter errors
This commit is contained in:
@@ -45,13 +45,13 @@ module Homebrew
|
||||
unpack_dir = Pathname.pwd
|
||||
end
|
||||
|
||||
raise "Cannot write to #{unpack_dir}" unless unpack_dir.writable_real?
|
||||
odie "Cannot write to #{unpack_dir}" unless unpack_dir.writable_real?
|
||||
|
||||
formulae.each do |f|
|
||||
stage_dir = unpack_dir/"#{f.name}-#{f.version}"
|
||||
|
||||
if stage_dir.exist?
|
||||
raise "Destination #{stage_dir} already exists!" unless args.force?
|
||||
odie "Destination #{stage_dir} already exists!" unless args.force?
|
||||
|
||||
rm_rf stage_dir
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user