From e7d447e39acb3dfa760a1ff1aaa211f7c76c30a9 Mon Sep 17 00:00:00 2001 From: Adrian Sutton Date: Sun, 2 Jun 2024 00:15:26 +1000 Subject: [PATCH] external-geth: Fix lint error by checking error (#10713) --- op-e2e/external_geth/main.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/op-e2e/external_geth/main.go b/op-e2e/external_geth/main.go index dc965131f94e..f68fbd073be2 100644 --- a/op-e2e/external_geth/main.go +++ b/op-e2e/external_geth/main.go @@ -5,6 +5,7 @@ import ( "errors" "flag" "fmt" + "io" "os" "os/exec" "os/signal" @@ -176,7 +177,9 @@ func execute(binPath string, config external.Config) (*gethSession, error) { } var authString string var port int - fmt.Fscanf(sess.Err, "%d %s", &port, &authString) + if _, err := fmt.Fscanf(sess.Err, "%d %s", &port, &authString); err != nil && !errors.Is(err, io.EOF) { + return nil, fmt.Errorf("error while reading auth string: %w", err) + } switch authString { case "auth=true": enginePort = port