Skip to content

Commit

Permalink
external-geth: Fix lint error by checking error (#10713)
Browse files Browse the repository at this point in the history
  • Loading branch information
ajsutton committed Jun 1, 2024
1 parent bd7ceb0 commit e7d447e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion op-e2e/external_geth/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"errors"
"flag"
"fmt"
"io"
"os"
"os/exec"
"os/signal"
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit e7d447e

Please sign in to comment.