refactor: use exit code 137 to signify a lock was unable to be retrieved when calling ps:retire
Closes #5432
This commit is contained in:
@@ -111,12 +111,12 @@ func CommandRetire(appName string) error {
|
||||
fileLock := flock.New(lockFile)
|
||||
locked, err := fileLock.TryLock()
|
||||
if err != nil {
|
||||
return fmt.Errorf("Failed to acquire ps:retire lock: %s", err)
|
||||
return &RetireLockFailed{&err}
|
||||
}
|
||||
defer fileLock.Unlock()
|
||||
|
||||
if !locked {
|
||||
return fmt.Errorf("Failed to acquire ps:retire lock")
|
||||
return &RetireLockFailed{}
|
||||
}
|
||||
|
||||
common.LogInfo1("Retiring old containers and images")
|
||||
|
||||
Reference in New Issue
Block a user