Commit 33ba3f63 authored by Brian Tiger Chow's avatar Brian Tiger Chow Committed by Juan Batiz-Benet

refactor(mount_unix) return the errs in select

fix(mount_unix) rm extraneous error
parent fed2f8d2
...@@ -63,18 +63,17 @@ not be listable, as it is virtual. Accessing known paths directly. ...@@ -63,18 +63,17 @@ not be listable, as it is virtual. Accessing known paths directly.
nsdone := mountIpns(ctx.Node, nsdir, fsdir) nsdone := mountIpns(ctx.Node, nsdir, fsdir)
// wait until mounts return an error (or timeout if successful) // wait until mounts return an error (or timeout if successful)
var err error
select { select {
case err = <-fsdone: case err := <-fsdone:
case err = <-nsdone: return nil, err
case err := <-nsdone:
return nil, err
// mounted successfully, we timed out with no errors // mounted successfully, we timed out with no errors
case <-time.After(mountTimeout): case <-time.After(mountTimeout):
output := ctx.Config.Mounts output := ctx.Config.Mounts
return &output, nil return &output, nil
} }
return nil, err
}, },
Type: &config.Mounts{}, Type: &config.Mounts{},
Marshallers: map[cmds.EncodingType]cmds.Marshaller{ Marshallers: map[cmds.EncodingType]cmds.Marshaller{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment