mirror of
https://github.com/ipfs/kubo.git
synced 2026-03-07 09:17:49 +08:00
Merge pull request #167 from cryptix/fixServeHttp
fix setupCmdContext() for subcommands
This commit is contained in:
commit
7366b7f8ac
@ -184,7 +184,7 @@ type cmdContext struct {
|
||||
// setupCmdContext initializes a cmdContext structure from a given command.
|
||||
func setupCmdContext(c *commander.Command, online bool) (cc cmdContext, err error) {
|
||||
rootCmd := c
|
||||
for ; rootCmd.Parent != nil; rootCmd = c.Parent {
|
||||
for ; rootCmd.Parent != nil; rootCmd = rootCmd.Parent {
|
||||
}
|
||||
|
||||
cc.configDir, err = getConfigDir(rootCmd)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user