@cryptotaxi247 / kubo / commits / a269e4601

fix setupCmdContext() for subcommands (fixes #163)

Henry committed Oct 14, 2014 at 10:49 UTC a269e46017a1e5c926827975fc389dced1de181c
1 file changed +1 -1
cmd/ipfs/ipfs.go
+1 -1
@@ -184,7 +184,7 @@ type cmdContext struct {
184 // setupCmdContext initializes a cmdContext structure from a given command.
185 func setupCmdContext(c *commander.Command, online bool) (cc cmdContext, err error) {
186 rootCmd := c
187 - for ; rootCmd.Parent != nil; rootCmd = c.Parent {
187 + for ; rootCmd.Parent != nil; rootCmd = rootCmd.Parent {
188 }
189
190 cc.configDir, err = getConfigDir(rootCmd)