From 3e2c2c92da166d1eefd8b5f13267f81ea792c5fd Mon Sep 17 00:00:00 2001 From: H Date: Thu, 2 May 2019 14:47:57 -0500 Subject: [PATCH] fields-insteadof-split --- internal/build/env.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/build/env.go b/internal/build/env.go index b553e0ed80..99ba0d3bf0 100644 --- a/internal/build/env.go +++ b/internal/build/env.go @@ -84,8 +84,8 @@ func LocalEnv() Environment { env := applyEnvFlags(Environment{Name: "local", Repo: "ethereum/go-ethereum"}) head := readGitFile("HEAD") - if splits := strings.Split(head, " "); len(splits) == 2 { - head = splits[1] + if fields := strings.Fields(head); len(fields) == 2 { + head = fields[1] } else { return env }