service: define paths as expecting Pathname or string

Co-authored-by: Rylan Polster <rslpolster@gmail.com>
This commit is contained in:
Sean Molenaar 2021-05-24 14:20:46 +02:00 committed by GitHub
parent fceaa2bb74
commit e29b2caee0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -55,7 +55,7 @@ module Homebrew
when String, Pathname when String, Pathname
@root_dir = path.to_s @root_dir = path.to_s
else else
raise TypeError, "Service#root_dir expects a String" raise TypeError, "Service#root_dir expects a String or Pathname"
end end
end end
@ -67,7 +67,7 @@ module Homebrew
when String, Pathname when String, Pathname
@input_path = path.to_s @input_path = path.to_s
else else
raise TypeError, "Service#input_path expects a String" raise TypeError, "Service#input_path expects a String or Pathname"
end end
end end