mirror of
https://github.com/ipfs/kubo.git
synced 2026-03-06 00:38:08 +08:00
fuse: Parse OSX fuse version properly
License: MIT Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
This commit is contained in:
parent
c12f9777c5
commit
e76b14aef0
@ -11,6 +11,8 @@ import (
|
||||
"syscall"
|
||||
|
||||
core "github.com/ipfs/go-ipfs/core"
|
||||
|
||||
"gx/ipfs/QmU1N5xVAUXgo3XRTt6GhJ2SuJEbxj2zRgMS7FpjSR2U83/semver"
|
||||
)
|
||||
|
||||
func init() {
|
||||
@ -138,11 +140,17 @@ func darwinFuseCheckVersion(node *core.IpfsNode) error {
|
||||
}
|
||||
|
||||
log.Debug("mount: osxfuse version:", ov)
|
||||
if strings.HasPrefix(ov, "2.7.") || strings.HasPrefix(ov, "2.8.") {
|
||||
return nil
|
||||
|
||||
min := semver.MustParse("2.7.2")
|
||||
curr, err := semver.Make(ov)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return fmt.Errorf(errStrUpgradeFuse, ov)
|
||||
if curr.LT(min) {
|
||||
return fmt.Errorf(errStrUpgradeFuse, ov)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func tryGFV() (string, error) {
|
||||
|
||||
@ -293,6 +293,12 @@
|
||||
"hash": "QmXGevGDVTqeKdisBzaxEK4CJZqfxeXiVSWLaXaVWcG5on",
|
||||
"name": "go-smux-multiplex",
|
||||
"version": "1.1.4"
|
||||
},
|
||||
{
|
||||
"author": "blang",
|
||||
"hash": "QmU1N5xVAUXgo3XRTt6GhJ2SuJEbxj2zRgMS7FpjSR2U83",
|
||||
"name": "semver",
|
||||
"version": "3.3.0"
|
||||
}
|
||||
],
|
||||
"gxVersion": "0.4.0",
|
||||
|
||||
Loading…
Reference in New Issue
Block a user