Fix offlineMode not being written for third-party clients with no client-specific config data

This commit is contained in:
2025-06-28 19:09:58 -04:00
parent d1b5c50d70
commit 362eb75dc4
+3 -1
View File
@@ -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"