Assign error-specific exit codes to constants

This commit is contained in:
2024-08-13 20:48:20 -04:00
parent a1c9827c04
commit 4c54349b39
17 changed files with 90 additions and 92 deletions
+3 -3
View File
@@ -24,7 +24,7 @@ func ShearRemoteFromClient(targetLocationIncomplete string) {
err := sshClient.Close()
if err != nil {
fmt.Println(core.AnsiError+"Sync failed - Unable to close SSH client:", err.Error()+core.AnsiReset)
os.Exit(104)
os.Exit(core.ErrorServerConnection)
}
}
@@ -51,7 +51,7 @@ func RenameRemoteFromClient(oldLocationIncomplete, newLocationIncomplete string)
err := sshClient.Close()
if err != nil {
fmt.Println(core.AnsiError+"Sync failed - Unable to close SSH client:", err.Error()+core.AnsiReset)
os.Exit(104)
os.Exit(core.ErrorServerConnection)
}
}
@@ -75,7 +75,7 @@ func AddFolderRemoteFromClient(targetLocationIncomplete string) {
err := sshClient.Close()
if err != nil {
fmt.Println(core.AnsiError+"Sync failed - Unable to close SSH client:", err.Error()+core.AnsiReset)
os.Exit(104)
os.Exit(core.ErrorServerConnection)
}
}