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

--ignore parameter order matters #171

Closed
dimkin-eu opened this issue Sep 4, 2024 · 3 comments
Closed

--ignore parameter order matters #171

dimkin-eu opened this issue Sep 4, 2024 · 3 comments

Comments

@dimkin-eu
Copy link

I discovered by accident that the order of the parameters is crucial; otherwise, it can lead to unexpected errors.

docker run --rm -it pactfoundation/pact-cli:latest /bin/sh   
# pact-broker version
1.76.0
~ #  pact-broker can-i-deploy --pacticipant someName --ignore someOtherName --version 9ec0ec93 --to-environment uat --broker-base-url URL --broker-username user --broker-password pass 

The version must be specified using `--version VERSION`, `--branch BRANCH` `--latest`, `--latest TAG`, or `--all TAG` for pacticipant someName
~ #  pact-broker can-i-deploy --pacticipant someName --version 9ec0ec93 --ignore someOtherName --to-environment uat --broker-base-url URL --broker-username  user --broker-password pass 
Computer says yes \o/ 

There is nothing about it in docs

Still there are some CLI guidelines

Guideline 11:
The order of different options relative to one another should not matter, 
unless the options are documented as mutually-exclusive 
and such an option is documented to override any incompatible options preceding it...
@mefellows
Copy link
Member

Screenshot 2024-09-05 at 6 22 16 PM

Well, it does say this

@dimkin-eu
Copy link
Author

oh mama, then closing as user error ? :)
image

@mefellows
Copy link
Member

I think so. If there are other strange variants, you might consider re-opening. Thor (the underlying CLI library) does have its quirks, but changing the behaviour would result in a breaking change of sorts, so we'd possibly need to consider a major version bump just to straighten it out!

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

No branches or pull requests

2 participants