Closed aliismayilov closed 2 months ago
Not sure if this is solvable given the current syntax expectations. According to the docs the following is valid and works:
❯ ./kamal.rb exec db:migrate --env STATEMENT_TIMEOUT:0 foo:bar
these are the options: {"env"=>{"STATEMENT_TIMEOUT"=>"0", "foo"=>"bar"}}
this is the command: db:migrate
On the other hand, moving db:migrate
to the end will always yield ambiguous result. I don't see why thor shouldn't parse db:migrate
in the following example as part of the --env
hash.
❯ ./kamal.rb exec --env STATEMENT_TIMEOUT:0 foo:bar db:migrate
One could argue that the positional arguments should always be extracted, but that also won't always work, since positional arguments can be optional.
Not sure if applicable for issues: 🌈
When there is a method option as hash and one of the positional arguments also includes a colon, then the command parser fails. To demonstrate:
Failure looks like this:
related: https://github.com/basecamp/kamal/issues/800