-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Fix config option #214
Fix config option #214
Conversation
When running something like: $ ipfs -c="file/path/.go-ipfs" init options must be parsed before looking up a sub-command. Otherwise -c="file/path/.go-ipfs" will be the key for the sub-command lookup and it will not work. License: MIT Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
License: MIT Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
I recall making that change to commander in the past and it had some odd consequences... |
@chriscool we shouldn't modify anything under We can modify my fork of commander here: https://github.com/jbenet/commander but, mappum's commands PR (#196) will move us into our own Also, (feel free to rebase the branch) The test LGTM! |
Ok, this can wait until PR #196 and our own commands/ package. About conflicting with child flags, I think "ipfs" command flags should be independent from child command flags. For example with git ou can say: git -c color.ui=false grep -c ok where "-c color.ui=false" is a "git" command flag and the other "-c" is a "git grep" command flag. By the way it could be useful for ipfs to have a way to change config values just for one command, like the above "-c name=value" "git" command flag. |
Yeah I was leaning towards this as well at first. (i.e. @chriscool do you have more examples of clashing flag names in git? or is this a rare occurrence? |
It is a rare occurence because there are very few one letter flags for the "git" command: -c, -C and -p. By the way it looks like docker uses the same |
👍 |
@chriscool I really gotta say that these tests youre writing are awesome |
Seconded, these are so useful! |
Thanks guys! I am happy that you like them. I will write more of them, especially this week end. Btw I am often lurking at the IRC archive and I like what you are doing very much. It feels great to see how fast the project is moving! It reminds me when I started working on Git in 2006 :-) |
@chriscool is this PR still something that could be merged? or should we just close it? |
closing due to inactivity, if needed, reopen |
Yeah, sorry for not responding. I think it was too old and could not be merged anymore. |
no worries, just working on cleaning up our stale PRs. |
gx publish 4.4.18
The first patch in this PR makes "ipfs -c=dir/.go-ipfs init" work.
The second patch adds some tests to catch any regression.