Skip to content

Commit a3bdfd6

Browse files
committed
fix macos build when fuse is enabled
Instead of trying to export the `errNeedFuseVersion` type, just use string matching. It's good enough for testing and the alternative was annoying. License: MIT Signed-off-by: Steven Allen <[email protected]>
1 parent 739f762 commit a3bdfd6

File tree

3 files changed

+2
-5
lines changed

3 files changed

+2
-5
lines changed

fuse/node/mount_nofuse.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ import (
88
core "github.com/ipfs/go-ipfs/core"
99
)
1010

11-
type errNeedFuseVersion error // used in tests, needed in OSX
12-
1311
func Mount(node *core.IpfsNode, fsdir, nsdir string) error {
1412
return errors.New("not compiled in")
1513
}

fuse/node/mount_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ package node
55
import (
66
"io/ioutil"
77
"os"
8+
"strings"
89
"testing"
910
"time"
1011

@@ -63,7 +64,7 @@ func TestExternalUnmount(t *testing.T) {
6364
mkdir(t, ipnsDir)
6465

6566
err = Mount(node, ipfsDir, ipnsDir)
66-
if _, ok := err.(errNeedFuseVersion); ok || err == fuse.ErrOSXFUSENotFound {
67+
if strings.Contains(err.Error(), "unable to check fuse version") || err == fuse.ErrOSXFUSENotFound {
6768
t.Skip(err)
6869
}
6970
if err != nil {

fuse/node/mount_unix.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,6 @@ var platformFuseChecks = func(*core.IpfsNode) error {
3030
return nil
3131
}
3232

33-
type errNeedFuseVersion error // used in tests, needed in OSX
34-
3533
func Mount(node *core.IpfsNode, fsdir, nsdir string) error {
3634
// check if we already have live mounts.
3735
// if the user said "Mount", then there must be something wrong.

0 commit comments

Comments
 (0)