Merge pull request #167 from cryptix/fixServeHttp

fix setupCmdContext() for subcommands
This commit is contained in:
Juan Batiz-Benet 2014-10-14 02:11:39 -07:00
commit 7366b7f8ac

View File

@ -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)