aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cask/lib
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Homebrew/cask/lib')
-rw-r--r--Library/Homebrew/cask/lib/hbc/artifact/relocated.rb4
-rw-r--r--Library/Homebrew/cask/lib/hbc/cli.rb2
2 files changed, 3 insertions, 3 deletions
diff --git a/Library/Homebrew/cask/lib/hbc/artifact/relocated.rb b/Library/Homebrew/cask/lib/hbc/artifact/relocated.rb
index 7757d32d0..4dba46c9d 100644
--- a/Library/Homebrew/cask/lib/hbc/artifact/relocated.rb
+++ b/Library/Homebrew/cask/lib/hbc/artifact/relocated.rb
@@ -35,10 +35,10 @@ module Hbc
altnames = "(#{altnames})"
# Some packges are shipped as u=rx (e.g. Bitcoin Core)
- @command.run!("/bin/chmod", args: ["--", "u+rw", file.to_s, file.realpath.to_s])
+ @command.run!("/bin/chmod", args: ["--", "u+rw", file, file.realpath])
@command.run!("/usr/bin/xattr",
- args: ["-w", ALT_NAME_ATTRIBUTE, altnames, file.to_s],
+ args: ["-w", ALT_NAME_ATTRIBUTE, altnames, file],
print_stderr: false)
end
diff --git a/Library/Homebrew/cask/lib/hbc/cli.rb b/Library/Homebrew/cask/lib/hbc/cli.rb
index aa795fc59..37784f4c3 100644
--- a/Library/Homebrew/cask/lib/hbc/cli.rb
+++ b/Library/Homebrew/cask/lib/hbc/cli.rb
@@ -113,7 +113,7 @@ module Hbc
if command.respond_to?(:run)
# usual case: built-in command verb
command.run(*rest)
- elsif require? which("brewcask-#{command}.rb").to_s
+ elsif require?(which("brewcask-#{command}.rb"))
# external command as Ruby library on PATH, Homebrew-style
elsif command.to_s.include?("/") && require?(command.to_s)
# external command as Ruby library with literal path, useful