Ver código fonte

libnetwork: processSetKeyReexec: don't use logrus.Fatal()

Just print the error and os.Exit() instead, which makes it more
explicit that we're exiting, and there's no need to decorate the
error.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Sebastiaan van Stijn 2 anos atrás
pai
commit
881fff1a2f
1 arquivos alterados com 2 adições e 1 exclusões
  1. 2 1
      libnetwork/sandbox_externalkey_unix.go

+ 2 - 1
libnetwork/sandbox_externalkey_unix.go

@@ -31,7 +31,8 @@ const (
 // The docker exec-root can be specified as "-exec-root" flag. The default value is "/run/docker".
 func processSetKeyReexec() {
 	if err := setKey(); err != nil {
-		logrus.Fatal(err)
+		_, _ = fmt.Fprintln(os.Stderr, err)
+		os.Exit(1)
 	}
 }