mirror of
https://github.com/ipfs/kubo.git
synced 2025-06-29 17:36:38 +08:00
Turn on update checker for local nodes
This commit is contained in:

committed by
Juan Batiz-Benet

parent
f6650b0289
commit
bd9142f042
@ -119,6 +119,16 @@ func localNode(confdir string, online bool) (*core.IpfsNode, error) {
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if cfg.Updates.Check != "ignore" {
|
||||||
|
obsolete := checkForUpdates()
|
||||||
|
if obsolete != nil {
|
||||||
|
fmt.Println(obsolete)
|
||||||
|
if cfg.Updates.Check == "error" {
|
||||||
|
return nil, obsolete
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return core.NewIpfsNode(cfg, online)
|
return core.NewIpfsNode(cfg, online)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@ import (
|
|||||||
|
|
||||||
// The IPFS version.
|
// The IPFS version.
|
||||||
const (
|
const (
|
||||||
Version = "0.2.0"
|
Version = "0.1.0"
|
||||||
EndpointURLLatestReleases = "https://api.github.com/repos/jbenet/go-ipfs/tags"
|
EndpointURLLatestReleases = "https://api.github.com/repos/jbenet/go-ipfs/tags"
|
||||||
VersionErrorShort = `Warning: You are running version %s of go-ipfs. The latest version is %s.`
|
VersionErrorShort = `Warning: You are running version %s of go-ipfs. The latest version is %s.`
|
||||||
VersionErrorLong = `
|
VersionErrorLong = `
|
||||||
|
Reference in New Issue
Block a user