diff --git a/cmd/new.go b/cmd/new.go index be86ad4..9a17af9 100644 --- a/cmd/new.go +++ b/cmd/new.go @@ -1,6 +1,7 @@ package cmd import ( + "fmt" "os/exec" "github.com/spf13/cobra" @@ -15,6 +16,8 @@ func NewCmd() *cobra.Command { if err != nil { return err } + fmt.Println("lookpath:", path) + return nil }, } } diff --git a/main.go b/main.go index 37d9438..fddb595 100644 --- a/main.go +++ b/main.go @@ -48,7 +48,7 @@ func init() { rootCmd.CompletionOptions.HiddenDefaultCmd = true rootCmd.CompletionOptions.DisableNoDescFlag = true // rootCmd.SetUsageTemplate(resources.Usage) - rootCmd.AddCommand(cmd.InitCmd()) + rootCmd.AddCommand(cmd.InitCmd(), cmd.NewCmd()) rootCmd.Version = goinfo.String() }