Skip to content
This repository has been archived by the owner on Mar 19, 2021. It is now read-only.

Commit

Permalink
Export ErrOSXFUSENotFound, callers want to check for it
Browse files Browse the repository at this point in the history
  • Loading branch information
tv42 committed Mar 17, 2016
1 parent 4a4e002 commit 37bfa8b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
10 changes: 10 additions & 0 deletions mount.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,21 @@ package fuse

import (
"bufio"
"errors"
"io"
"log"
"sync"
)

var (
// ErrOSXFUSENotFound is returned from Mount when the OSXFUSE
// installation is not detected.
//
// Only happens on OS X. Make sure OSXFUSE is installed, or see
// OSXFUSELocations for customization.
ErrOSXFUSENotFound = errors.New("cannot locate OSXFUSE")
)

func neverIgnoreLine(line string) bool {
return false
}
Expand Down
7 changes: 3 additions & 4 deletions mount_darwin.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,8 @@ import (
)

var (
errNoAvail = errors.New("no available fuse devices")
errNotLoaded = errors.New("osxfuse is not loaded")
errOSXFUSENotFound = errors.New("cannot locate OSXFUSE")
errNoAvail = errors.New("no available fuse devices")
errNotLoaded = errors.New("osxfuse is not loaded")
)

func loadOSXFUSE(bin string) error {
Expand Down Expand Up @@ -202,5 +201,5 @@ func mount(dir string, conf *mountConfig, ready chan<- struct{}, errp *error) (*
}
return f, nil
}
return nil, errOSXFUSENotFound
return nil, ErrOSXFUSENotFound
}

0 comments on commit 37bfa8b

Please sign in to comment.