mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
fields-insteadof-split
This commit is contained in:
parent
4263000f2c
commit
3e2c2c92da
1 changed files with 2 additions and 2 deletions
|
|
@ -84,8 +84,8 @@ func LocalEnv() Environment {
|
||||||
env := applyEnvFlags(Environment{Name: "local", Repo: "ethereum/go-ethereum"})
|
env := applyEnvFlags(Environment{Name: "local", Repo: "ethereum/go-ethereum"})
|
||||||
|
|
||||||
head := readGitFile("HEAD")
|
head := readGitFile("HEAD")
|
||||||
if splits := strings.Split(head, " "); len(splits) == 2 {
|
if fields := strings.Fields(head); len(fields) == 2 {
|
||||||
head = splits[1]
|
head = fields[1]
|
||||||
} else {
|
} else {
|
||||||
return env
|
return env
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue