Fix implicit conversion of nil into string error

This commit is contained in:
Esther W 2017-05-18 13:08:19 -07:00
parent 0977b4a17d
commit 37222c1953

View File

@ -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"))
elsif require?(which("brewcask-#{command}.rb").to_s)
# 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