mirror of
https://github.com/ipfs/kubo.git
synced 2026-02-21 10:27:46 +08:00
fix: kubo in daemon and cli stdout
This commit is contained in:
parent
639155c732
commit
d30e71fa5a
@ -923,7 +923,7 @@ func printVersion() {
|
||||
if version.CurrentCommit != "" {
|
||||
v += "-" + version.CurrentCommit
|
||||
}
|
||||
fmt.Printf("go-ipfs version: %s\n", v)
|
||||
fmt.Printf("Kubo version: %s\n", v)
|
||||
fmt.Printf("Repo version: %d\n", fsrepo.RepoVersion)
|
||||
fmt.Printf("System version: %s\n", runtime.GOARCH+"/"+runtime.GOOS)
|
||||
fmt.Printf("Golang version: %s\n", runtime.Version())
|
||||
|
||||
@ -46,7 +46,7 @@ var VersionCmd = &cmds.Command{
|
||||
if version.Commit != "" {
|
||||
ver += "-" + version.Commit
|
||||
}
|
||||
out := fmt.Sprintf("go-ipfs version: %s\n"+
|
||||
out := fmt.Sprintf("Kubo version: %s\n"+
|
||||
"Repo version: %s\nSystem version: %s\nGolang version: %s\n",
|
||||
ver, version.Repo, version.System, version.Golang)
|
||||
fmt.Fprint(w, out)
|
||||
|
||||
@ -35,7 +35,7 @@ test_expect_success "ipfs versions matches ipfs --version" '
|
||||
|
||||
test_expect_success "ipfs version --all has all required fields" '
|
||||
ipfs version --all > version_all.txt &&
|
||||
grep "go-ipfs version" version_all.txt &&
|
||||
grep "Kubo version" version_all.txt &&
|
||||
grep "Repo version" version_all.txt &&
|
||||
grep "System version" version_all.txt &&
|
||||
grep "Golang version" version_all.txt
|
||||
|
||||
Loading…
Reference in New Issue
Block a user