mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Add exported status code from a job
This allows the job's status code to be consumed externally so that we can use it as an exit code or saving to a state file. Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
This commit is contained in:
parent
6b0f0af0e9
commit
f90029611f
1 changed files with 4 additions and 0 deletions
|
@ -208,3 +208,7 @@ func (job *Job) Error(err error) Status {
|
|||
fmt.Fprintf(job.Stderr, "%s\n", err)
|
||||
return StatusErr
|
||||
}
|
||||
|
||||
func (job *Job) StatusCode() int {
|
||||
return int(job.status)
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue