Return errors from ParseConfig (facilitates GUI development)

This commit is contained in:
2024-12-29 16:23:08 -05:00
parent 1a1d4ed1e4
commit 2feeeb74d7
4 changed files with 20 additions and 12 deletions
+2 -2
View File
@@ -29,9 +29,9 @@ func GetSSHClient(manualSync bool) (*ssh.Client, string, bool) {
if manualSync {
missingValueError = joinErrorWithEXE("SSH settings not configured - Run \"", " init\" to configure")
} else {
missingValueError = "0"
missingValueError = "0" // allow silent exit at this point in offline mode
}
sshUserConfig = core.ParseConfig([][2]string{{"LIBMUTTON", "sshUser"}, {"LIBMUTTON", "sshIP"}, {"LIBMUTTON", "sshPort"}, {"LIBMUTTON", "sshKey"}, {"LIBMUTTON", "sshKeyProtected"}, {"LIBMUTTON", "sshEntryRoot"}, {"LIBMUTTON", "sshIsWindows"}}, missingValueError)
sshUserConfig, _ = core.ParseConfig([][2]string{{"LIBMUTTON", "sshUser"}, {"LIBMUTTON", "sshIP"}, {"LIBMUTTON", "sshPort"}, {"LIBMUTTON", "sshKey"}, {"LIBMUTTON", "sshKeyProtected"}, {"LIBMUTTON", "sshEntryRoot"}, {"LIBMUTTON", "sshIsWindows"}}, missingValueError)
var user, ip, port, keyFile, keyFileProtected, entryRoot string
var isWindows bool