fix: del the error judge

pull/1933/head
luhaoling 2 years ago
parent 247743fb16
commit 6aec72a5a4

@ -15,9 +15,7 @@
package genutil package genutil
import ( import (
"errors"
"fmt" "fmt"
"github.com/OpenIMSDK/tools/errs"
"os" "os"
"path/filepath" "path/filepath"
) )
@ -43,9 +41,6 @@ func OutDir(path string) (string, error) {
} }
func ExitWithError(err error) { func ExitWithError(err error) {
if errors.Is(errs.Unwrap(err), errors.New("SIGTERM EXIT")) {
os.Exit(-1)
}
progName := filepath.Base(os.Args[0]) progName := filepath.Base(os.Args[0])
fmt.Fprintf(os.Stderr, "\n\n%s exit -1: \n%+v\n\n", progName, err) fmt.Fprintf(os.Stderr, "\n\n%s exit -1: \n%+v\n\n", progName, err)
os.Exit(-1) os.Exit(-1)

Loading…
Cancel
Save