aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/cask/lib/hbc/caskroom.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/Library/Homebrew/cask/lib/hbc/caskroom.rb b/Library/Homebrew/cask/lib/hbc/caskroom.rb
index 7f4aab0a9..b5c947f4b 100644
--- a/Library/Homebrew/cask/lib/hbc/caskroom.rb
+++ b/Library/Homebrew/cask/lib/hbc/caskroom.rb
@@ -5,10 +5,10 @@ module Hbc
def ensure_caskroom_exists
return if Hbc.caskroom.exist?
- ohai "Creating Caskroom at #{Hbc.caskroom}"
+ ohai "Creating Caskroom at #{Hbc.caskroom}" if $stdout.tty?
sudo = !Hbc.caskroom.parent.writable?
- ohai "We'll set permissions properly so we won't need sudo in the future" if sudo
+ ohai "We'll set permissions properly so we won't need sudo in the future" if $stdout.tty? && sudo
SystemCommand.run("/bin/mkdir", args: ["-p", Hbc.caskroom], sudo: sudo)
SystemCommand.run("/bin/chmod", args: ["g+rwx", Hbc.caskroom], sudo: sudo)