Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
AlexSkrypnyk opened this issue Aug 4, 2022 · 5 comments
Closed

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

AlexSkrypnyk opened this issue Aug 4, 2022 · 5 comments
Assignees

Comments

@AlexSkrypnyk
Copy link
Collaborator

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
Copy link
Member

ocean commented Aug 4, 2022

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
Copy link

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

@ocean
Copy link
Member

ocean commented Aug 4, 2022

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
Copy link
Member

ocean commented Aug 4, 2022

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
Copy link
Collaborator Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants