Skip to content

Commit e78af3e

Browse files
committed
fuse: make osxfuse check config check more permissive
License: MIT Signed-off-by: Jeromy <[email protected]>
1 parent 1a4361e commit e78af3e

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

fuse/node/mount_darwin.go

+11-8
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ trying to run these checks with:
109109
[3]: %s
110110
`
111111

112-
var errStrFixConfig = `config key invalid: %s %s
112+
var errStrFixConfig = `config key invalid: %s %v
113113
You may be able to get this error to go away by setting it again:
114114
115115
ipfs config %s true
@@ -221,12 +221,15 @@ func userAskedToSkipFuseCheck(node *core.IpfsNode) (skip bool, err error) {
221221
if err != nil {
222222
return false, nil // failed to get config value. dont skip check.
223223
}
224-
s, ok := val.(string)
225-
if !ok {
226-
// got config value, but it's invalid... dont skip check, ask the user to fix it...
227-
return false, fmt.Errorf(errStrFixConfig, dontCheckOSXFUSEConfigKey, val,
228-
dontCheckOSXFUSEConfigKey)
224+
if s, ok := val.(string); ok {
225+
return s == "true", nil
229226
}
230-
// only "true" counts as telling us to skip.
231-
return s == "true", nil
227+
228+
if b, ok := val.(bool); ok {
229+
return b, nil
230+
}
231+
232+
// got config value, but it's invalid... dont skip check, ask the user to fix it...
233+
return false, fmt.Errorf(errStrFixConfig, dontCheckOSXFUSEConfigKey, val,
234+
dontCheckOSXFUSEConfigKey)
232235
}

0 commit comments

Comments
 (0)