mirror of
https://github.com/rwinkhart/libmutton.git
synced 2026-09-03 23:57:27 -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
|
// 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)
|
||||||
|
} else {
|
||||||
|
err = cfg.WriteConfig([][3]string{{"LIBMUTTON", "offlineMode", "true"}}, nil, false)
|
||||||
|
}
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return errors.New("unable to write config file: " + err.Error())
|
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)
|
||||||
fallbackSSHKey := back.Home + global.PathSeparator + ".ssh" + global.PathSeparator + "id_ed25519"
|
fallbackSSHKey := back.Home + global.PathSeparator + ".ssh" + global.PathSeparator + "id_ed25519"
|
||||||
|
|||||||
Reference in New Issue
Block a user