updates: printing fixes
Henry committed
Oct 22, 2014 at 12:34 UTC
d9552fea185937b603a297e47ce9d31799840215
1 file changed
+3
-2
updates/updates.go
+3
-2
@@ -36,6 +36,7 @@ func init() {
36
log.Error("invalid version number in code (must be semver): %q\n", Version)
37
os.Exit(1)
38
}
39
+ log.Info("go-ipfs Version: %s", currentVersion)
40
}
41
42
func parseVersion() (*semver.Version, error) {
@@ -166,7 +167,7 @@ func CliCheckForUpdates(cfg *config.Config, confFile string) error {
167
}
168
169
// BUG(cryptix): no good way to restart yet. - tracking https://github.com/inconshreveable/go-update/issues/5
169
- fmt.Println("update %v applied. please restart.", u.Version)
170
+ fmt.Printf("update %v applied. please restart.\n", u.Version)
171
os.Exit(0)
172
}
173
}
@@ -177,7 +178,7 @@ func CliCheckForUpdates(cfg *config.Config, confFile string) error {
178
return fmt.Errorf(errShouldUpdate, Version, u.Version)
179
case config.CheckWarn:
180
// print the warning
180
- fmt.Printf("New version available: %s", u.Version)
181
+ fmt.Printf("New version available: %s\n", u.Version)
182
default: // ignore
183
}
184
return nil