@cryptotaxi247 / kubo / commits / 33ba3f632

refactor(mount_unix) return the errs in select

fix(mount_unix) rm extraneous error

Brian Tiger Chow committed Nov 11, 2014 at 23:51 UTC 33ba3f6321415733ac8d8591e5e2265cc7fb5679
1 file changed +4 -5
core/commands2/mount_unix.go
+4 -5
@@ -63,18 +63,17 @@ not be listable, as it is virtual. Accessing known paths directly.
63 nsdone := mountIpns(ctx.Node, nsdir, fsdir)
64
65 // wait until mounts return an error (or timeout if successful)
66 - var err error
66 select {
68 - case err = <-fsdone:
69 - case err = <-nsdone:
67 + case err := <-fsdone:
68 + return nil, err
69 + case err := <-nsdone:
70 + return nil, err
71
72 // mounted successfully, we timed out with no errors
73 case <-time.After(mountTimeout):
74 output := ctx.Config.Mounts
75 return &output, nil
76 }
76 -
77 - return nil, err
77 },
78 Type: &config.Mounts{},
79 Marshallers: map[cmds.EncodingType]cmds.Marshaller{