diff options
| author | Markus Reiter | 2017-07-27 19:33:01 +0200 |
|---|---|---|
| committer | GitHub | 2017-07-27 19:33:01 +0200 |
| commit | a49d99a2d6a22f9db1540cb546ac2d7be2fb5703 (patch) | |
| tree | b8f8987b3a256a21639716267d0e71a016a5d494 | |
| parent | 867590b648674a1cda1cad68ba50d9f861b12bfe (diff) | |
| parent | d8288eeb3a962c7647a9240caf13cc174e98d5d2 (diff) | |
| download | brew-a49d99a2d6a22f9db1540cb546ac2d7be2fb5703.tar.bz2 | |
Merge pull request #2949 from reitermarkus/caskroom-messages
Don’t output Caskroom creation messages on non-TTY.
| -rw-r--r-- | Library/Homebrew/cask/lib/hbc/caskroom.rb | 4 |
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) |
