AbstractUninstall: coerce which argument to String
`Cask::Artifact::AbstractUninstall.uninstall_script` contains a `which` call that uses a `Pathname` argument instead of a `String` and this leads to a type error (`Parameter 'cmd': Expected type String, got type Pathname with value...`). This resolves the error by calling `#to_s` on the `executable_path` argument.
This commit is contained in:
parent
f6ce120b40
commit
ba0bc88b3d
@ -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