Skip to content

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

Closed

Description

@AlexSkrypnyk

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

Activity

  1. ocean commented on Aug 4, 2022

    @ocean
    Member

    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.

  2. nicksantamaria commented on Aug 4, 2022

    @nicksantamaria

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

  3. ocean commented on Aug 4, 2022

    @ocean
    Member

    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?

  4. ocean commented on Aug 4, 2022

    @ocean
    Member

    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

  5. added a commit that references this issue on Aug 5, 2022
  6. AlexSkrypnyk commented on Aug 5, 2022

    @AlexSkrypnyk
    CollaboratorAuthor

    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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    ⌂ 换网址