Do not parse verbose flags in shim args#1239
Conversation
797b834 to
b760e0b
Compare
MDrakos
left a comment
There was a problem hiding this comment.
I believe cobra should be handling this for us here https://github.com/ActiveState/cli/blob/master/cmd/state/internal/cmdtree/shim.go#L43 but perhaps it's not being called any longer? I noticed that shim has a --path flag so disabling flag parsing may interfere with that. I'm not sure that shim logic should live in main. Can you take a look into this and see if disableFlagParsing is working as intended?
|
The issue here, is that the check for verbose arguments is done even before the cmdtree is initialized. So, this parsing is completely separate from cobra: Here is where the cmdtree is initialized: |
|
@Naatan The Windows shim also uses the double dash separator: https://github.com/ActiveState/cli/blob/master/assets%2Fshim%2Fshim.bat#L5 |
MDrakos
left a comment
There was a problem hiding this comment.
The issue here, is that the check for verbose arguments is done even before the cmdtree is initialized. So, this parsing is completely separate from cobra
I see what you mean. I will defer to @Naatan on this one. I still feel that we should be handling the flags all in one place, but that should probably be it's own ticket.
https://www.pivotaltracker.com/story/show/176667499