From 0e4a796ed5e70fe6a57d17c007ebe92690d91d49 Mon Sep 17 00:00:00 2001 From: Randall Winkhart Date: Fri, 17 May 2024 19:49:49 -0400 Subject: [PATCH] Promote native sync to replace sshyp-based sync on all platforms --- src/sync/client.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/sync/client.go b/src/sync/client.go index 672f7b0..1b5d087 100644 --- a/src/sync/client.go +++ b/src/sync/client.go @@ -151,8 +151,12 @@ func getRemoteDataFromClient(manualSync bool) (map[string]int64, []string, []str // get remote output over SSH clientDeviceID, _ := os.ReadDir(backend.ConfigDir + backend.PathSeparator + "devices") if len(clientDeviceID) == 0 { - fmt.Println(backend.AnsiError + "Sync failed - No device ID found; run \"mutn init\" to generate a device ID" + backend.AnsiReset) - os.Exit(1) + if manualSync { + fmt.Println(backend.AnsiError + "Sync failed - No device ID found; run \"mutn init\" to generate a device ID" + backend.AnsiReset) + os.Exit(1) + } else { + os.Exit(0) // exit silently if the sync job was called automatically, as the user may just be in offline mode + } } output := GetSSHOutput("libmuttonserver fetch "+clientDeviceID[0].Name()+" "+strconv.FormatBool(backend.IsWindows), manualSync)