Merge pull request #20595 from Homebrew/cask/system_command-coerce-pathname-to-string
AbstractUninstall: coerce which argument to String
This commit is contained in:
commit
affc65e55a
@ -376,7 +376,7 @@ module Cask
|
|||||||
executable_path = staged_path_join_executable(executable)
|
executable_path = staged_path_join_executable(executable)
|
||||||
|
|
||||||
if (executable_path.absolute? && !executable_path.exist?) ||
|
if (executable_path.absolute? && !executable_path.exist?) ||
|
||||||
(!executable_path.absolute? && (which executable_path).nil?)
|
(!executable_path.absolute? && which(executable_path.to_s).nil?)
|
||||||
message = "uninstall script #{executable} does not exist"
|
message = "uninstall script #{executable} does not exist"
|
||||||
raise CaskError, "#{message}." unless force
|
raise CaskError, "#{message}." unless force
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user