Skip to content

Add :stopped to opts when stopped by on_stop#105

Open
wishdev wants to merge 2 commits intoManageIQ:masterfrom
wishdev:master
Open

Add :stopped to opts when stopped by on_stop#105
wishdev wants to merge 2 commits intoManageIQ:masterfrom
wishdev:master

Conversation

@wishdev
Copy link
Copy Markdown

@wishdev wishdev commented Apr 18, 2019

I would like to have the parser set a value if on_stop finds a keyword in the args. Otherwise I need to parse the first argument of ARGV in order to determine whether or not a valid command was given (in a command/subcommand scenario).

Only adds it if on_stop exists.

Copy link
Copy Markdown
Member

@Fryguy Fryguy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Copy Markdown
Member

@Fryguy Fryguy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Technically, this could break any existing users that may have stopped as an option. Though, I'm not sure there's any "nice" way to do this given the hash. Maybe prefix the symbol with an underscore (i.e. :_stopped)

@wishdev
Copy link
Copy Markdown
Author

wishdev commented May 23, 2019

:_stopped sounds perfect to me - good catch on the possible conflict

@chessbyte
Copy link
Copy Markdown
Member

@Fryguy @kbrock please review.

Copy link
Copy Markdown
Member

@kbrock kbrock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Fryguy you good with the _stopped?

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants