提交 654fa3fe 作者: Brian Tiger Chow 提交者: Juan Batiz-Benet

fix(commands/mount_unix, optionvalue) handle found, !found

@mappum, could you provide a quick LGTM?
上级 c46102ce
......@@ -42,10 +42,12 @@ not be listable, as it is virtual. Accessing known paths directly.
return nil, err
}
// update fsdir with flag.
fsdir := ctx.Config.Mounts.IPFS
if req.Option("f").Found() {
fsdir, _ = req.Option("f").String()
fsdir, found, err := req.Option("f").String()
if err != nil {
return nil, err
}
if !found {
fsdir = ctx.Config.Mounts.IPFS // use default value
}
fsdone := mountIpfs(ctx.Node, fsdir)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论