aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/extend/pathname.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/Library/Homebrew/extend/pathname.rb b/Library/Homebrew/extend/pathname.rb
index a0c24e981..40c6eba31 100644
--- a/Library/Homebrew/extend/pathname.rb
+++ b/Library/Homebrew/extend/pathname.rb
@@ -393,7 +393,9 @@ class Pathname
out = ""
n = Utils.popen_read("find", expand_path.to_s, "-type", "f", "!", "-name", ".DS_Store").split("\n").size
out << "#{n} files, " if n > 1
- out << Utils.popen_read("/usr/bin/du", "-hs", expand_path.to_s).split("\t")[0].strip
+ size = Utils.popen_read("/usr/bin/du", "-hs", expand_path.to_s).split("\t")[0]
+ size ||= "0B"
+ out << size.strip
out
end