Run the command with some --bar argument in second then first position:
$ ./bin/app test foo --bar
["foo"]
$ ./bin/app test --bar foo
["--bar", "foo"]
Description of issue
Using distillery 2.0.12 on Amazon Linux release 2 (Karoo) and release_remote_ctl rpc --mfa "Mix.Tasks.Test.run/1" --argv -- "$@", I was expecting the -- to allow any argument to have a prefixed --, but it seems that only the first argument can. Others arguments starting by -- are not passed to the function in the arguments list.
I'm not sure if this is expected or not, but it prevents to have several flags arguments. Note that the arguments are correctly received when using mix.
This is fixed in the latest version of artificery, you can get it via mix deps.update artificery. Let me know if you see any more weird behavior with argument parsing!
Steps to reproduce
Add a mix task:
Create an associated command in
rel/config.exs
:and add the
rel/commands/test.sh
script:Run the command with some
--bar
argument in second then first position:Description of issue
Using distillery 2.0.12 on
Amazon Linux release 2 (Karoo)
andrelease_remote_ctl rpc --mfa "Mix.Tasks.Test.run/1" --argv -- "$@"
, I was expecting the--
to allow any argument to have a prefixed--
, but it seems that only the first argument can. Others arguments starting by--
are not passed to the function in the arguments list.I'm not sure if this is expected or not, but it prevents to have several flags arguments. Note that the arguments are correctly received when using
mix
.