mirror of
https://github.com/rwinkhart/libmutton.git
synced 2026-09-06 00:57:17 -04:00
Fix offlineMode not being written for third-party clients with no client-specific config data
This commit is contained in:
+3
-1
@@ -26,10 +26,12 @@ 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)
|
||||
} 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)
|
||||
fallbackSSHKey := back.Home + global.PathSeparator + ".ssh" + global.PathSeparator + "id_ed25519"
|
||||
|
||||
Reference in New Issue
Block a user