From f90029611fec082a41b5629e43a88a39f0674fe2 Mon Sep 17 00:00:00 2001 From: Michael Crosby Date: Wed, 23 Apr 2014 13:47:56 -0700 Subject: [PATCH] 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 (github: crosbymichael) --- engine/job.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/engine/job.go b/engine/job.go index 50d64011f9..b56155ac1c 100644 --- a/engine/job.go +++ b/engine/job.go @@ -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) +}