🚸 agent: exit code

This commit is contained in:
naiba 2020-12-20 13:03:03 +08:00
parent 2ae832f509
commit 13e8ea76ed

View File

@ -47,8 +47,6 @@ var (
updateCh = make(chan struct{}, 0)
)
const agentUpgrade = 55
func doSelfUpdate() {
defer func() {
time.Sleep(time.Minute * 20)
@ -66,7 +64,7 @@ func doSelfUpdate() {
log.Println("Current binary is the latest version", version)
} else {
log.Println("Successfully updated to version", latest.Version)
os.Exit(agentUpgrade)
os.Exit(1)
}
}