Do not always save executable name in memory in sync package

This commit is contained in:
2024-07-09 16:04:03 -04:00
parent 9a8f2db78e
commit 6273485aea
5 changed files with 14 additions and 23 deletions
+2 -2
View File
@@ -26,7 +26,7 @@ func getSSHClient(manualSync bool) (*ssh.Client, string, bool) {
var sshUserConfig []string
var missingValueError string
if manualSync {
missingValueError = "SSH settings not configured - run \"" + vanityEXE + " init\" to configure"
missingValueError = joinErrorWithEXE("SSH settings not configured - run \"", " init\" to configure")
} else {
missingValueError = "0"
}
@@ -135,7 +135,7 @@ func getRemoteDataFromClient(manualSync bool) (map[string]int64, []string, []str
clientDeviceID, _ := os.ReadDir(backend.ConfigDir + backend.PathSeparator + "devices")
if len(clientDeviceID) == 0 {
if manualSync {
fmt.Println(backend.AnsiError + "Sync failed - No device ID found; run \"" + vanityEXE + " init\" to generate a device ID" + backend.AnsiReset)
fmt.Println(joinErrorWithEXE("Sync failed - No device ID found; run \"", " init\" to generate a device ID"))
os.Exit(1)
} else {
backend.Exit(0) // exit silently if the sync job was called automatically, as the user may just be in offline mode