aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/utils.rb
diff options
context:
space:
mode:
authorNaoto Kaneko2017-02-27 14:23:53 +0900
committerNaoto Kaneko2017-02-27 14:23:53 +0900
commit928eaca26720fd38b07c1e7df3f9f567477d48db (patch)
treec08fd030cca960e74bab72b59ce057684e554334 /Library/Homebrew/utils.rb
parentccc9b2dc6dc27026673db3c8871c691be9541342 (diff)
parente3f4701f385c286a2cc72c5d07870cc9a6ce0bf4 (diff)
downloadbrew-928eaca26720fd38b07c1e7df3f9f567477d48db.tar.bz2
Merge branch 'master' into exclude-executable-metafiles
Added tests in keg_test and pathname_test was moved into keg_spec and pathname_spec.
Diffstat (limited to 'Library/Homebrew/utils.rb')
-rw-r--r--Library/Homebrew/utils.rb7
1 files changed, 4 insertions, 3 deletions
diff --git a/Library/Homebrew/utils.rb b/Library/Homebrew/utils.rb
index 70d2787d9..56ddfd611 100644
--- a/Library/Homebrew/utils.rb
+++ b/Library/Homebrew/utils.rb
@@ -10,6 +10,7 @@ require "utils/github"
require "utils/hash"
require "utils/inreplace"
require "utils/popen"
+require "utils/svn"
require "utils/tty"
require "time"
@@ -421,13 +422,13 @@ end
def disk_usage_readable(size_in_bytes)
if size_in_bytes >= 1_073_741_824
size = size_in_bytes.to_f / 1_073_741_824
- unit = "G"
+ unit = "GB"
elsif size_in_bytes >= 1_048_576
size = size_in_bytes.to_f / 1_048_576
- unit = "M"
+ unit = "MB"
elsif size_in_bytes >= 1_024
size = size_in_bytes.to_f / 1_024
- unit = "K"
+ unit = "KB"
else
size = size_in_bytes
unit = "B"