mirror of
https://github.com/docker/cli.git
synced 2026-01-16 20:22:36 +03:00
Merge pull request #4761 from ichik1/fix-display-of-since-time-exit
Fix since time exit display when s.FinishedAt is zero Upstream-commit: de450b23bea244747953229c2ba43ca4a78c7368 Component: engine
This commit is contained in:
@@ -28,6 +28,9 @@ func (s *State) String() string {
|
||||
}
|
||||
return fmt.Sprintf("Up %s", utils.HumanDuration(time.Now().UTC().Sub(s.StartedAt)))
|
||||
}
|
||||
if s.FinishedAt.IsZero() {
|
||||
return ""
|
||||
}
|
||||
return fmt.Sprintf("Exited (%d) %s ago", s.ExitCode, utils.HumanDuration(time.Now().UTC().Sub(s.FinishedAt)))
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user