github.com/andrewrech/lazygit@v0.8.1/pkg/commands/errors.go (about) 1 package commands 2 3 import "github.com/go-errors/errors" 4 5 // WrapError wraps an error for the sake of showing a stack trace at the top level 6 // the go-errors package, for some reason, does not return nil when you try to wrap 7 // a non-error, so we're just doing it here 8 func WrapError(err error) error { 9 if err == nil { 10 return err 11 } 12 13 return errors.Wrap(err, 0) 14 }