1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-06-27 16:07:42 +08:00

Turn on update checker for local nodes

This commit is contained in:
Peter Borzov
2014-10-06 17:26:52 -04:00
committed by Juan Batiz-Benet
parent f6650b0289
commit bd9142f042
2 changed files with 11 additions and 1 deletions

View File

@ -119,6 +119,16 @@ func localNode(confdir string, online bool) (*core.IpfsNode, error) {
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)
}

View File

@ -13,7 +13,7 @@ import (
// The IPFS version.
const (
Version = "0.2.0"
Version = "0.1.0"
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.`
VersionErrorLong = `