Skip to content

Commit

Permalink
all: print template error
Browse files Browse the repository at this point in the history
  • Loading branch information
egonelbre committed Dec 28, 2020
1 parent 2c5cce8 commit 77bbe48
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion cut/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ func (cmd *Command) Execute(ctx context.Context, f *flag.FlagSet, _ ...interface

t, err := templates.Parse(cmd.format)
if err != nil {
fmt.Fprintf(os.Stderr, "invalid label string\n")
fmt.Fprintf(os.Stderr, "invalid label string: %v\n", err)
return subcommands.ExitFailure
}

Expand Down
2 changes: 1 addition & 1 deletion exec/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ func (cmd *Command) Execute(ctx context.Context, f *flag.FlagSet, _ ...interface

t, err := templates.Parse(cmd.format)
if err != nil {
fmt.Fprintf(os.Stderr, "invalid format string\n")
fmt.Fprintf(os.Stderr, "invalid format string: %v\n", err)
return subcommands.ExitFailure
}

Expand Down
2 changes: 1 addition & 1 deletion graph/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ func (cmd *Command) Execute(ctx context.Context, f *flag.FlagSet, _ ...interface

label, err := templates.Parse(cmd.labelFormat)
if err != nil {
fmt.Fprintf(os.Stderr, "invalid label format\n")
fmt.Fprintf(os.Stderr, "invalid label format: %v\n", err)
return subcommands.ExitFailure
}

Expand Down
2 changes: 1 addition & 1 deletion list/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ func (cmd *Command) Execute(ctx context.Context, f *flag.FlagSet, _ ...interface

t, err := templates.Parse(cmd.format)
if err != nil {
fmt.Fprintf(os.Stderr, "invalid format string\n")
fmt.Fprintf(os.Stderr, "invalid format string: %v\n", err)
return subcommands.ExitFailure
}

Expand Down
2 changes: 1 addition & 1 deletion tree/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ func (cmd *Command) Execute(ctx context.Context, f *flag.FlagSet, _ ...interface

t, err := templates.Parse(cmd.format)
if err != nil {
fmt.Fprintf(os.Stderr, "invalid format string\n")
fmt.Fprintf(os.Stderr, "invalid format string: %v\n", err)
return subcommands.ExitFailure
}

Expand Down

0 comments on commit 77bbe48

Please sign in to comment.