Add json tables output to debug mode
This commit is contained in:
parent
513e490c00
commit
e35ecd76c1
3 changed files with 15 additions and 1 deletions
3
main.go
3
main.go
|
@ -78,7 +78,7 @@ func main() {
|
|||
if e, ok := err.(commandFailure); ok {
|
||||
fmt.Printf("Error: %v\n\n", string(e))
|
||||
rootCmd.Help()
|
||||
} else if !viper.GetBool("debug") {
|
||||
} else if !cmdConfig.Debug {
|
||||
fmt.Printf("Error: %v\n", err)
|
||||
} else {
|
||||
fmt.Printf("Error: %+v\n", err)
|
||||
|
@ -107,6 +107,7 @@ func preRun(cmd *cobra.Command, args []string) error {
|
|||
DriverName: driverName,
|
||||
OutFolder: viper.GetString("output"),
|
||||
PkgName: viper.GetString("pkgname"),
|
||||
Debug: viper.GetBool("debug"),
|
||||
NoTests: viper.GetBool("no-tests"),
|
||||
NoHooks: viper.GetBool("no-hooks"),
|
||||
NoAutoTimestamps: viper.GetBool("no-auto-timestamps"),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue