From 423ea8a81b07fa0d566764e091c7e19770082ae4 Mon Sep 17 00:00:00 2001 From: Randall Winkhart Date: Thu, 30 May 2024 23:25:08 -0400 Subject: [PATCH] Fix init deleting device ID immediately after generating it; fix sync failure for non-manual syncs --- src/cli/init.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/cli/init.go b/src/cli/init.go index 0a3d189..dd4dd4b 100644 --- a/src/cli/init.go +++ b/src/cli/init.go @@ -40,16 +40,16 @@ func TempInitCli() { sshKeyProtected := inputBinary("Is the identity file password-protected?") // write config file - backend.TempInit(map[string]string{"textEditor": textEditor, "gpgID": gpgID, "sshUser": sshUser, "sshIP": sshIP, "sshPort": sshPort, "sshKey": sshKey, "sshKeyProtected": strconv.FormatBool(sshKeyProtected)}) + backend.TempInit(map[string]string{"textEditor": textEditor, "gpgID": gpgID, "sshUser": sshUser, "sshIP": sshIP, "sshPort": sshPort, "sshKey": sshKey, "sshKeyProtected": strconv.FormatBool(sshKeyProtected)}, false) // generate device ID sshEntryRoot, sshIsWindows := sync.DeviceIDGen() // update config file with sshEntryRoot and sshIsWindows TODO append to existing config file - backend.TempInit(map[string]string{"textEditor": textEditor, "gpgID": gpgID, "sshUser": sshUser, "sshIP": sshIP, "sshPort": sshPort, "sshKey": sshKey, "sshKeyProtected": strconv.FormatBool(sshKeyProtected), "sshEntryRoot": sshEntryRoot, "sshIsWindows": sshIsWindows}) + backend.TempInit(map[string]string{"textEditor": textEditor, "gpgID": gpgID, "sshUser": sshUser, "sshIP": sshIP, "sshPort": sshPort, "sshKey": sshKey, "sshKeyProtected": strconv.FormatBool(sshKeyProtected), "sshEntryRoot": sshEntryRoot, "sshIsWindows": sshIsWindows}, true) } else { // write config file - backend.TempInit(map[string]string{"textEditor": textEditor, "gpgID": gpgID}) + backend.TempInit(map[string]string{"textEditor": textEditor, "gpgID": gpgID}, false) } }