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-unixfs
Commits
d1c4ffba
Commit
d1c4ffba
authored
Sep 19, 2014
by
Juan Batiz-Benet
Committed by
Brian Tiger Chow
Sep 22, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
init -f fix and output
parent
b7b04658
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
cmd/ipfs/init.go
cmd/ipfs/init.go
+6
-2
No files found.
cmd/ipfs/init.go
View file @
d1c4ffba
...
...
@@ -43,6 +43,7 @@ func initCmd(c *commander.Command, inp []string) error {
}
}
u
.
POut
(
"initializing ipfs node at %s
\n
"
,
configpath
)
filename
,
err
:=
config
.
Filename
(
configpath
+
"/config"
)
if
err
!=
nil
{
return
errors
.
New
(
"Couldn't get home directory path"
)
...
...
@@ -53,8 +54,10 @@ func initCmd(c *commander.Command, inp []string) error {
if
!
ok
{
return
errors
.
New
(
"failed to parse force flag"
)
}
if
fi
!=
nil
||
(
err
!=
nil
&&
!
os
.
IsNotExist
(
err
))
&&
!
force
{
return
errors
.
New
(
"ipfs configuration file already exists!
\n
Reinitializing would overwrite your keys.
\n
(use -f to force overwrite)"
)
if
fi
!=
nil
||
(
err
!=
nil
&&
!
os
.
IsNotExist
(
err
))
{
if
!
force
{
return
errors
.
New
(
"ipfs configuration file already exists!
\n
Reinitializing would overwrite your keys.
\n
(use -f to force overwrite)"
)
}
}
cfg
:=
new
(
config
.
Config
)
...
...
@@ -78,6 +81,7 @@ func initCmd(c *commander.Command, inp []string) error {
return
errors
.
New
(
"Bitsize less than 1024 is considered unsafe."
)
}
u
.
POut
(
"generating key pair
\n
"
)
sk
,
pk
,
err
:=
ci
.
GenerateKeyPair
(
ci
.
RSA
,
nbits
)
if
err
!=
nil
{
return
err
...
...
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