Skip to content
Snippets Groups Projects
Commit 9105acab authored by Markus Reiter's avatar Markus Reiter Committed by GitHub
Browse files

Merge pull request #2283 from reitermarkus/cask-cli-argumenterror

Use `ArgumentError` instead of `CaskError` in `CLI`.
parents fe694f6d 536a377d
No related branches found
No related tags found
No related merge requests found
......@@ -229,9 +229,9 @@ module Hbc
remaining << head
retry
rescue OptionParser::MissingArgument
raise CaskError, "The option '#{head}' requires an argument"
raise ArgumentError, "The option '#{head}' requires an argument."
rescue OptionParser::AmbiguousOption
raise CaskError, "There is more than one possible option that starts with '#{head}'"
raise ArgumentError, "There is more than one possible option that starts with '#{head}'."
end
end
......
......@@ -108,7 +108,7 @@ describe Hbc::CLI, :cask do
it "shows a user-friendly error message" do
expect {
Hbc::CLI.process_options %w[install -f]
}.to raise_error(Hbc::CaskError)
}.to raise_error(ArgumentError)
end
end
......@@ -116,7 +116,7 @@ describe Hbc::CLI, :cask do
it "shows a user-friendly error message" do
expect {
Hbc::CLI.process_options %w[edit -c]
}.to raise_error(Hbc::CaskError)
}.to raise_error(ArgumentError)
end
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment