mirror of
https://github.com/rwinkhart/libmutton.git
synced 2026-08-28 04:46:42 -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
|
||||
if len(clientSpecificIniData) > 0 {
|
||||
err = cfg.WriteConfig(append(clientSpecificIniData, [][3]string{{"LIBMUTTON", "offlineMode", "true"}}...), nil, false)
|
||||
if err != nil {
|
||||
return errors.New("unable to write config file: " + err.Error())
|
||||
}
|
||||
} else {
|
||||
err = cfg.WriteConfig([][3]string{{"LIBMUTTON", "offlineMode", "true"}}, nil, false)
|
||||
}
|
||||
if err != nil {
|
||||
return errors.New("unable to write config file: " + err.Error())
|
||||
}
|
||||
} else {
|
||||
// ensure ssh key file exists (and is a file)
|
||||
|
||||
Reference in New Issue
Block a user