From d8288eeb3a962c7647a9240caf13cc174e98d5d2 Mon Sep 17 00:00:00 2001 From: Markus Reiter Date: Wed, 26 Jul 2017 20:30:37 +0200 Subject: [PATCH] =?UTF-8?q?Don=E2=80=99t=20output=20Caskroom=20creation=20?= =?UTF-8?q?messages=20on=20non-TTY.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Library/Homebrew/cask/lib/hbc/caskroom.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Library/Homebrew/cask/lib/hbc/caskroom.rb b/Library/Homebrew/cask/lib/hbc/caskroom.rb index 7f4aab0a97..b5c947f4b1 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)