Refactor error handling in main.go for better clarity and instructions

This commit is contained in:
Simon Larsen 2024-05-14 11:15:15 +01:00
parent dcc9d4fdf2
commit 0bf8713b60
No known key found for this signature in database
GPG Key ID: 96C5DCA24769DBCA
3 changed files with 3 additions and 3 deletions

2
.vscode/launch.json vendored
View File

@ -25,7 +25,7 @@
"request": "launch",
"mode": "debug",
"program": "./InfrastructureAgent",
"args": ["start"]
"args": ["start"],
},
{
"name": "Node.js - Debug Current File",

View File

@ -136,7 +136,7 @@ func main() {
if err != nil {
slog.Error(err.Error())
os.Exit(2)
os.Exit(1)
}
slog.Info("OneUptime Infrastructure Agent Started")
@ -157,7 +157,7 @@ func main() {
err = s.Run()
if err != nil {
slog.Error(err.Error())
os.Exit(2)
os.Exit(1)
}
case "uninstall", "stop", "restart":