ahoy-cli / ahoy

Create self-documenting cli programs from YAML files. Easily wrap bash, grunt, npm, docker, (anything) to standardize your processes and make the lives of the people working on your project better.
http://ahoycli.com/
MIT License
265 stars 36 forks source link

End of command options -- is not respected in 2.0.1 #100

Closed AlexSkrypnyk closed 2 years ago

AlexSkrypnyk commented 2 years ago

Having ahoy.yml:

  up:
    usage: Build and start Docker containers.
    cmd: |
      docker-compose up -d "$@"

In 2.0.0:

ahoy up -- --build => OK

In 2.0.1 ahoy up -- --build => unknown service --build meaning that -- --build is passed literally instead of just --build

ocean commented 2 years ago

Trying to find a good command I can use to test this with, that isn't docker-compose - need something simple that takes long option parameters.

nicksantamaria commented 2 years ago

kubectl is a good one, lots of flags, arguments, some accept stdin, some are interactive

ocean commented 2 years ago

Just clarifying, does this only affect passing arguments to commands which have the "$@" (array of all input parameters) parameter set?

I'm clarifying expected behaviour here - if the command doesn't expect all parameters to be given to it, then it should just ignore them, right?

ocean commented 2 years ago

Also an alpha pre-release out to use for testing if this is fixed, at https://github.com/ahoy-cli/ahoy/releases/tag/2.0.2-alpha

AlexSkrypnyk commented 2 years ago

This has been fixed and tests were added. I tested this locally on multiple machines - works as expected.

Thank you @ocean

Closing this issue now.