Skip to content

Hotfix: return parsed options if argument parsing failed#378

Merged
jbenet merged 1 commit intoipfs:masterfrom
dborzov:fix/nil-options
Nov 23, 2014
Merged

Hotfix: return parsed options if argument parsing failed#378
jbenet merged 1 commit intoipfs:masterfrom
dborzov:fix/nil-options

Conversation

@dborzov
Copy link
Contributor

@dborzov dborzov commented Nov 23, 2014

This fixes #373.

The reason it was failing is that Parse() func even when req instance was intialized correctly it was not returned if there was an argument parsing exception.

Request.options contains mention of --help flag (within request.options as map[string]string{help:"",}) that is used to check if the help option was called.

@jbenet
Copy link
Member

jbenet commented Nov 23, 2014

@dborzov good find! LGTM

jbenet added a commit that referenced this pull request Nov 23, 2014
Hotfix: return parsed options if argument parsing failed
@jbenet jbenet merged commit cd914c1 into ipfs:master Nov 23, 2014
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 this pull request may close these issues.

ipfs add --help is broken

2 participants