Merge pull request #20595 from Homebrew/cask/system_command-coerce-pathname-to-string

AbstractUninstall: coerce which argument to String
This commit is contained in:
Mike McQuaid 2025-08-28 17:37:34 +00:00 committed by GitHub
commit affc65e55a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -376,7 +376,7 @@ module Cask
executable_path = staged_path_join_executable(executable)
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"
raise CaskError, "#{message}." unless force