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

v0.12.3 broke flag parsing #2039

Closed
ThisGuyCodes opened this issue Sep 4, 2020 · 3 comments · Fixed by #2043
Closed

v0.12.3 broke flag parsing #2039

ThisGuyCodes opened this issue Sep 4, 2020 · 3 comments · Fixed by #2043
Assignees

Comments

@ThisGuyCodes
Copy link
Contributor

ThisGuyCodes commented Sep 4, 2020

Bug

Current Behavior

garden --env=pr --logger-type=basic --log-level=debug build prints usage information

Expected behavior

garden --env=pr --logger-type=basic --log-level=debug build runs garden build with the given flags

Reproducible example

Workaround

Re-order the flags to go after the command.

Suggested solution(s)

Flags / options should be positionally independant (or as often as possible).

Additional context

This worked in v0.12.2.

Position-dependant flags make writing automated interactions with garden more difficult (save for things like "last one wins" which actually makes things easier!). I.e. I have a set of flags I want to be added for any command run in our CI process, so I created a wrapper for running garden commands. I now have to change this to care about the location of the flags.

I recognize position-dependance is actually practical and useful for things. However I don't believe "logger-type", "log-level", or "env" fit that description.

Your environment

Linux, ubuntu 20.04.

garden version

0.12.3
@ThisGuyCodes
Copy link
Contributor Author

ThisGuyCodes commented Sep 4, 2020

perhaps even more concerning is that when this error occurs garden exits with a 0 status code. Thus my builds said they succeeded, and I only noticed because they were suspiciously fast.

@eysi09
Copy link
Collaborator

eysi09 commented Sep 7, 2020

This might be the same regression as #2035

@edvald
Copy link
Collaborator

edvald commented Sep 7, 2020

I'm on it.

@edvald edvald self-assigned this Sep 7, 2020
edvald added a commit that referenced this issue Sep 7, 2020
thsig pushed a commit that referenced this issue Sep 8, 2020
edvald added a commit that referenced this issue Sep 8, 2020
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

Successfully merging a pull request may close this issue.

3 participants