Promote native sync to replace sshyp-based sync on all platforms

This commit is contained in:
2024-05-17 19:49:49 -04:00
parent ecce45cfeb
commit 0e4a796ed5
+6 -2
View File
@@ -151,8 +151,12 @@ func getRemoteDataFromClient(manualSync bool) (map[string]int64, []string, []str
// get remote output over SSH // get remote output over SSH
clientDeviceID, _ := os.ReadDir(backend.ConfigDir + backend.PathSeparator + "devices") clientDeviceID, _ := os.ReadDir(backend.ConfigDir + backend.PathSeparator + "devices")
if len(clientDeviceID) == 0 { if len(clientDeviceID) == 0 {
fmt.Println(backend.AnsiError + "Sync failed - No device ID found; run \"mutn init\" to generate a device ID" + backend.AnsiReset) if manualSync {
os.Exit(1) 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) output := GetSSHOutput("libmuttonserver fetch "+clientDeviceID[0].Name()+" "+strconv.FormatBool(backend.IsWindows), manualSync)