1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-11-23 22:24:51 +02:00

move OS commands into their own package

This commit is contained in:
Jesse Duffield
2020-09-29 19:10:57 +10:00
parent f9643448a4
commit 1759ddf247
24 changed files with 175 additions and 151 deletions

14
pkg/utils/errors.go Normal file
View File

@@ -0,0 +1,14 @@
package utils
import "github.com/go-errors/errors"
// WrapError wraps an error for the sake of showing a stack trace at the top level
// the go-errors package, for some reason, does not return nil when you try to wrap
// a non-error, so we're just doing it here
func WrapError(err error) error {
if err == nil {
return err
}
return errors.Wrap(err, 0)
}