Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
dms3
go-dms3
Commits
d9552fea
Commit
d9552fea
authored
10 years ago
by
Henry
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updates: printing fixes
parent
3e407881
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
updates/updates.go
updates/updates.go
+3
-2
No files found.
updates/updates.go
View file @
d9552fea
...
...
@@ -36,6 +36,7 @@ func init() {
log
.
Error
(
"invalid version number in code (must be semver): %q
\n
"
,
Version
)
os
.
Exit
(
1
)
}
log
.
Info
(
"go-ipfs Version: %s"
,
currentVersion
)
}
func
parseVersion
()
(
*
semver
.
Version
,
error
)
{
...
...
@@ -166,7 +167,7 @@ func CliCheckForUpdates(cfg *config.Config, confFile string) error {
}
// BUG(cryptix): no good way to restart yet. - tracking https://github.com/inconshreveable/go-update/issues/5
fmt
.
Print
ln
(
"update %v applied. please restart."
,
u
.
Version
)
fmt
.
Print
f
(
"update %v applied. please restart.
\n
"
,
u
.
Version
)
os
.
Exit
(
0
)
}
}
...
...
@@ -177,7 +178,7 @@ func CliCheckForUpdates(cfg *config.Config, confFile string) error {
return
fmt
.
Errorf
(
errShouldUpdate
,
Version
,
u
.
Version
)
case
config
.
CheckWarn
:
// print the warning
fmt
.
Printf
(
"New version available: %s"
,
u
.
Version
)
fmt
.
Printf
(
"New version available: %s
\n
"
,
u
.
Version
)
default
:
// ignore
}
return
nil
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment