Skip to content

Commit

Permalink
Pretty print errors (#64)
Browse files Browse the repository at this point in the history
  • Loading branch information
kopiczko authored Dec 4, 2020
1 parent d48e6b7 commit 39b6a65
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Added

- Pretty print errors.

### Changed

- Remove helmclient.MergeValue functions usage.
Expand Down Expand Up @@ -54,7 +58,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Fixed

- Use apiextensions v3 and include replace for Giant Swarm CAPI fork.
- Use apiextensions v3 and include replace for Giant Swarm CAPI fork.
- Add replace for moby v20.10.0-beta1 to fix build issue on darwin.
- Optimize apps wait interval as app-operator has a status webhook.
- Use new catalog URL for Helm Stable.
Expand Down
7 changes: 6 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package main
import (
"context"
"fmt"
"os"

"github.com/giantswarm/microerror"
"github.com/giantswarm/micrologger"
Expand All @@ -14,7 +15,8 @@ import (
func main() {
err := mainE(context.Background())
if err != nil {
panic(fmt.Sprintf("%#v\n", err))
fmt.Fprintf(os.Stderr, "Error: %s\n", microerror.Pretty(err, true))
os.Exit(2)
}
}

Expand Down Expand Up @@ -43,6 +45,9 @@ func mainE(ctx context.Context) error {
}
}

rootCommand.SilenceErrors = true
rootCommand.SilenceUsage = true

err = rootCommand.Execute()
if err != nil {
return microerror.Mask(err)
Expand Down

0 comments on commit 39b6a65

Please sign in to comment.