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
4f42a268
Commit
4f42a268
authored
Oct 22, 2014
by
Henry
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed --force flag for shutdown after update
parent
d9552fea
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
3 deletions
+7
-3
cmd/ipfs/update.go
cmd/ipfs/update.go
+5
-1
core/commands/update.go
core/commands/update.go
+2
-2
No files found.
cmd/ipfs/update.go
View file @
4f42a268
...
...
@@ -6,6 +6,10 @@ import (
"github.com/jbenet/go-ipfs/core/commands"
)
func
init
()
{
cmdIpfsUpdate
.
Flag
.
Bool
(
"force"
,
false
,
"force shutdown of daemon when updating"
)
}
var
cmdIpfsUpdate
=
&
commander
.
Command
{
UsageLine
:
"update"
,
Short
:
"check for updates and apply them"
,
...
...
@@ -20,7 +24,7 @@ I wont even try, @jbenet. You do this much better :)`,
Run
:
makeCommand
(
command
{
name
:
"updateApply"
,
args
:
0
,
flags
:
nil
,
flags
:
[]
string
{
"force"
}
,
online
:
true
,
cmdFn
:
commands
.
UpdateApply
,
}),
...
...
core/commands/update.go
View file @
4f42a268
...
...
@@ -25,13 +25,13 @@ func UpdateApply(n *core.IpfsNode, args []string, opts map[string]interface{}, o
fmt
.
Fprintln
(
out
,
"New Version:"
,
u
.
Version
)
_
,
onDaemon
:=
opts
[
"onDaemon"
]
_
,
force
:=
opts
[
"force"
]
force
:=
opts
[
"force"
]
.
(
bool
)
if
onDaemon
&&
!
force
{
return
fmt
.
Errorf
(
`Error: update must stop running ipfs service.
You may want to abort the update, or shut the service down manually.
To shut it down automatically, run:
ipfs update
apply -f
ipfs update
--force
`
)
}
...
...
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