Commit e7d447e3 authored by Adrian Sutton's avatar Adrian Sutton Committed by GitHub

external-geth: Fix lint error by checking error (#10713)

parent bd7ceb02
...@@ -5,6 +5,7 @@ import ( ...@@ -5,6 +5,7 @@ import (
"errors" "errors"
"flag" "flag"
"fmt" "fmt"
"io"
"os" "os"
"os/exec" "os/exec"
"os/signal" "os/signal"
...@@ -176,7 +177,9 @@ func execute(binPath string, config external.Config) (*gethSession, error) { ...@@ -176,7 +177,9 @@ func execute(binPath string, config external.Config) (*gethSession, error) {
} }
var authString string var authString string
var port int 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 { switch authString {
case "auth=true": case "auth=true":
enginePort = port enginePort = port
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment