use odie when commands encounter errors

This commit is contained in:
EricFromCanada
2021-01-26 15:36:43 -05:00
parent a72ddfdc67
commit 2e982cd2a2
10 changed files with 15 additions and 14 deletions
+2 -2
View File
@@ -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