diff --git a/.github/workflows/elixir.yml b/.github/workflows/elixir.yml index ef756c9..cce7769 100644 --- a/.github/workflows/elixir.yml +++ b/.github/workflows/elixir.yml @@ -18,8 +18,8 @@ jobs: - name: Set up Elixir uses: erlef/setup-beam@v1 with: - elixir-version: '1.12.3' - otp-version: '24.1' + elixir-version: latest + otp-version: latest - name: Restore dependencies cache uses: actions/cache@v3 with: diff --git a/lib/cli.ex b/lib/cli.ex index 7783181..96a01df 100644 --- a/lib/cli.ex +++ b/lib/cli.ex @@ -7,9 +7,9 @@ defmodule Onigumo.CLI do parsed = OptionParser.parse(argv, aliases: [C: :working_dir], strict: [working_dir: :string]) - with {parsed_switches, [component], []} <- parsed do + with {switches, [component], []} <- parsed do {:ok, module} = Map.fetch(@components, String.to_atom(component)) - working_dir = Keyword.get(parsed_switches, :working_dir, File.cwd!()) + working_dir = Keyword.get(switches, :working_dir, File.cwd!()) module.main(working_dir) else _ -> usage_message()