diff options
| author | commitay | 2017-04-20 14:38:16 +1000 |
|---|---|---|
| committer | Markus Reiter | 2017-04-21 14:52:35 +0200 |
| commit | 7d9513130b525ae950214407be77083d97d31d9a (patch) | |
| tree | cc42cc8f709690a724cf7915a1ab110b447f68a6 /Library/Homebrew/cask/lib | |
| parent | 12fe8957499f80d2ae74102d9222cec8fd81ce43 (diff) | |
| download | brew-7d9513130b525ae950214407be77083d97d31d9a.tar.bz2 | |
Replace `FileUtils.chmod` with `/bin/chmod` for cask binaries. [WIP]
Update binary.rb
Update binary.rb
Update binary.rb
Diffstat (limited to 'Library/Homebrew/cask/lib')
| -rw-r--r-- | Library/Homebrew/cask/lib/hbc/artifact/binary.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Library/Homebrew/cask/lib/hbc/artifact/binary.rb b/Library/Homebrew/cask/lib/hbc/artifact/binary.rb index 06bdfe157..f41b1b85b 100644 --- a/Library/Homebrew/cask/lib/hbc/artifact/binary.rb +++ b/Library/Homebrew/cask/lib/hbc/artifact/binary.rb @@ -9,7 +9,12 @@ module Hbc def link super - FileUtils.chmod "+x", source + return if source.executable? + if source.writable? + FileUtils.chmod "+x", source + else + @command.run!.run("/bin/chmod", args: ["+x", source], sudo: true) + end end end end |
