提交 5705ea98 作者: Brian Tiger Chow

style(init): -> errRepoExists

@jbenet
上级 89afdabb
...@@ -58,7 +58,7 @@ var initCmd = &cmds.Command{ ...@@ -58,7 +58,7 @@ var initCmd = &cmds.Command{
}, },
} }
var errCannotInitConfigExists = debugerror.New(`ipfs configuration file already exists! var errRepoExists = debugerror.New(`ipfs configuration file already exists!
Reinitializing would overwrite your keys. Reinitializing would overwrite your keys.
(use -f to force overwrite) (use -f to force overwrite)
`) `)
...@@ -88,7 +88,7 @@ func doInit(repoRoot string, force bool, nBitsForKeypair int) (interface{}, erro ...@@ -88,7 +88,7 @@ func doInit(repoRoot string, force bool, nBitsForKeypair int) (interface{}, erro
u.POut("initializing ipfs node at %s\n", repoRoot) u.POut("initializing ipfs node at %s\n", repoRoot)
if fsrepo.IsInitialized(repoRoot) && !force { if fsrepo.IsInitialized(repoRoot) && !force {
return nil, errCannotInitConfigExists return nil, errRepoExists
} }
conf, err := initConfig(nBitsForKeypair) conf, err := initConfig(nBitsForKeypair)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论