Skip to content
Snippets Groups Projects
Commit a74b7ade authored by Markus Reiter's avatar Markus Reiter Committed by GitHub
Browse files

Merge pull request #2043 from reitermarkus/create-caskroom

Small fixes.
parents 18838109 a0597a3f
No related branches found
No related tags found
No related merge requests found
......@@ -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)
......
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment