mirror of
https://github.com/rwinkhart/libmutton.git
synced 2026-08-27 20:36:29 -04:00
Promote native sync to replace sshyp-based sync on all platforms
This commit is contained in:
+6
-2
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user