diff options
| author | Markus Reiter | 2017-02-17 05:35:12 +0100 |
|---|---|---|
| committer | GitHub | 2017-02-17 05:35:12 +0100 |
| commit | a74b7ade66e340c55b3bea7b6226fa68a311b4ce (patch) | |
| tree | f1a83f534d3f9ad4eaf82eb1e289ff2fc046e38c /Library | |
| parent | 18838109b76ddc2b4aa958a3e8fd9adfbd083c62 (diff) | |
| parent | a0597a3f15b8044a4bf2c4b58fdc4df54026a347 (diff) | |
| download | brew-a74b7ade66e340c55b3bea7b6226fa68a311b4ce.tar.bz2 | |
Merge pull request #2043 from reitermarkus/create-caskroom
Small fixes.
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/cask/lib/hbc/caskroom.rb | 3 | ||||
| -rw-r--r-- | Library/Homebrew/cask/lib/hbc/cli/fetch.rb | 4 |
2 files changed, 6 insertions, 1 deletions
diff --git a/Library/Homebrew/cask/lib/hbc/caskroom.rb b/Library/Homebrew/cask/lib/hbc/caskroom.rb index 644728129..255e23888 100644 --- a/Library/Homebrew/cask/lib/hbc/caskroom.rb +++ b/Library/Homebrew/cask/lib/hbc/caskroom.rb @@ -21,9 +21,10 @@ module Hbc return if Hbc.caskroom.exist? ohai "Creating Caskroom at #{Hbc.caskroom}" - ohai "We'll set permissions properly so we won't need sudo in the future" sudo = !Hbc.caskroom.parent.writable? + ohai "We'll set permissions properly so we won't need sudo in the future" if sudo + SystemCommand.run("/bin/mkdir", args: ["-p", Hbc.caskroom], sudo: sudo) SystemCommand.run("/bin/chmod", args: ["g+rwx", Hbc.caskroom], sudo: sudo) SystemCommand.run("/usr/sbin/chown", args: [Utils.current_user, Hbc.caskroom], sudo: sudo) diff --git a/Library/Homebrew/cask/lib/hbc/cli/fetch.rb b/Library/Homebrew/cask/lib/hbc/cli/fetch.rb index 9b3d5099c..fc928586f 100644 --- a/Library/Homebrew/cask/lib/hbc/cli/fetch.rb +++ b/Library/Homebrew/cask/lib/hbc/cli/fetch.rb @@ -15,6 +15,10 @@ module Hbc end end + def self.needs_init? + true + end + def self.help "downloads remote application files to local cache" end |
