mirror of
https://github.com/rwinkhart/libmutton.git
synced 2026-09-01 14:47:25 -04:00
Fix offlineMode not being written for third-party clients with no client-specific config data
This commit is contained in:
+5
-3
@@ -26,9 +26,11 @@ func LibmuttonInit(inputCB func(prompt string) string, clientSpecificIniData [][
|
|||||||
// write config file
|
// write config file
|
||||||
if len(clientSpecificIniData) > 0 {
|
if len(clientSpecificIniData) > 0 {
|
||||||
err = cfg.WriteConfig(append(clientSpecificIniData, [][3]string{{"LIBMUTTON", "offlineMode", "true"}}...), nil, false)
|
err = cfg.WriteConfig(append(clientSpecificIniData, [][3]string{{"LIBMUTTON", "offlineMode", "true"}}...), nil, false)
|
||||||
if err != nil {
|
} else {
|
||||||
return errors.New("unable to write config file: " + err.Error())
|
err = cfg.WriteConfig([][3]string{{"LIBMUTTON", "offlineMode", "true"}}, nil, false)
|
||||||
}
|
}
|
||||||
|
if err != nil {
|
||||||
|
return errors.New("unable to write config file: " + err.Error())
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// ensure ssh key file exists (and is a file)
|
// ensure ssh key file exists (and is a file)
|
||||||
|
|||||||
Reference in New Issue
Block a user