Skip to content

Commit a74b7ad

Browse files
authored
Merge pull request #2043 from reitermarkus/create-caskroom
Small fixes.
2 parents 1883810 + a0597a3 commit a74b7ad

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

Library/Homebrew/cask/lib/hbc/caskroom.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,10 @@ def ensure_caskroom_exists
2121
return if Hbc.caskroom.exist?
2222

2323
ohai "Creating Caskroom at #{Hbc.caskroom}"
24-
ohai "We'll set permissions properly so we won't need sudo in the future"
2524
sudo = !Hbc.caskroom.parent.writable?
2625

26+
ohai "We'll set permissions properly so we won't need sudo in the future" if sudo
27+
2728
SystemCommand.run("/bin/mkdir", args: ["-p", Hbc.caskroom], sudo: sudo)
2829
SystemCommand.run("/bin/chmod", args: ["g+rwx", Hbc.caskroom], sudo: sudo)
2930
SystemCommand.run("/usr/sbin/chown", args: [Utils.current_user, Hbc.caskroom], sudo: sudo)

Library/Homebrew/cask/lib/hbc/cli/fetch.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ def self.run(*args)
1515
end
1616
end
1717

18+
def self.needs_init?
19+
true
20+
end
21+
1822
def self.help
1923
"downloads remote application files to local cache"
2024
end

0 commit comments

Comments
 (0)