From 114eab5437a4293357a0ee0c01028e5e20a4a7d5 Mon Sep 17 00:00:00 2001 From: dstroch Date: Sat, 30 Nov 2024 18:29:51 +0100 Subject: [PATCH] Fix a bug with catching invalid number of switches --- lib/cli.ex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/cli.ex b/lib/cli.ex index 872eef8..42e82eb 100644 --- a/lib/cli.ex +++ b/lib/cli.ex @@ -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