Skip to content

Commit

Permalink
Fix a bug with catching invalid number of switches
Browse files Browse the repository at this point in the history
  • Loading branch information
nappex committed Nov 30, 2024
1 parent d460b29 commit 114eab5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/cli.ex
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ defmodule Onigumo.CLI do
module.main(working_dir)
else
:error -> usage_message()
{_, _, invalid_switches} when length(invalid_switches) -> usage_message()
{_, _, [_ | _]} -> usage_message()
{_, argv, _} when length(argv) != 1 -> usage_message()
_ -> usage_message()
end
Expand Down

0 comments on commit 114eab5

Please sign in to comment.