Commit 7972f3a7 authored by Juan Batiz-Benet's avatar Juan Batiz-Benet

fixed osx fuse checks

parent e7a5dc00
package main
import (
"fmt"
"runtime"
"strings"
"syscall"
)
func osxFuseCheck() error {
func init() {
// this is a hack, but until we need to do it another way, this works.
platformFuseChecks = darwinFuseCheckVersion
}
func darwinFuseCheckVersion() error {
// on OSX, check FUSE version.
if runtime.GOOS != "darwin" {
return nil
......@@ -17,7 +23,7 @@ func osxFuseCheck() error {
return err
}
if strings.HasPrefix(ov, "2.7.") || strings.HasPrefix(ov, "2.8.") {
if !strings.HasPrefix(ov, "2.7.") || strings.HasPrefix(ov, "2.8.") {
return nil
}
......
......@@ -33,7 +33,7 @@ func init() {
}
func mountCmd(c *commander.Command, inp []string) error {
if err := osxFuseCheck(); err != nil {
if err := platformFuseChecks(); err != nil {
return err
}
......@@ -95,3 +95,7 @@ func mountIpns(node *core.IpfsNode, nsdir, fsdir string) <-chan error {
return done
}
var platformFuseChecks = func() error {
return nil
}
package main
func osxFuseCheck() error {
return nil
}
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