mirror of
https://github.com/redhat-developer/odo.git
synced 2025-10-19 03:06:19 +03:00
Remove github.com/pkg/errors dependency (#5557)
* Change errors.Wrapf * Replace errors.Wrap * Dont use pkg/errors (except error.Cause) * Fix errors on Windows (do not test system underlying message) * Replace errors.Cause * Review
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
"github.com/redhat-developer/odo/pkg/odo/cli"
|
||||
"github.com/spf13/cobra"
|
||||
"github.com/spf13/pflag"
|
||||
@@ -185,7 +185,15 @@ func main() {
|
||||
|
||||
err := clidoc.Execute()
|
||||
if err != nil {
|
||||
fmt.Println(errors.Cause(err))
|
||||
for {
|
||||
e := errors.Unwrap(err)
|
||||
if e != nil {
|
||||
err = e
|
||||
} else {
|
||||
break
|
||||
}
|
||||
}
|
||||
fmt.Println(err)
|
||||
os.Exit(1)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user