diff --git a/core/src/plugins/exec.ts b/core/src/plugins/exec.ts index 9728096b20..199024b7b7 100644 --- a/core/src/plugins/exec.ts +++ b/core/src/plugins/exec.ts @@ -462,9 +462,13 @@ export const getExecServiceStatus: ServiceActionHandlers["getServiceStatus"] = a opts: { reject: false }, }) - return { state: result.exitCode === 0 ? "ready" : "outdated", detail: { statusCommandOutput: result.all } } + return { + state: result.exitCode === 0 ? "ready" : "outdated", + version: service.version, + detail: { statusCommandOutput: result.all }, + } } else { - return { state: "unknown", detail: {} } + return { state: "unknown", version: service.version, detail: {} } } } diff --git a/core/test/unit/src/plugins/exec.ts b/core/test/unit/src/plugins/exec.ts index fb5d09be10..2cf04d51c8 100644 --- a/core/test/unit/src/plugins/exec.ts +++ b/core/test/unit/src/plugins/exec.ts @@ -624,6 +624,7 @@ describe("exec plugin", () => { }, }) expect(res.state).to.equal("ready") + expect(res.version).to.equal(service.version) expect(res.detail.statusCommandOutput).to.equal("already deployed") }) @@ -642,6 +643,7 @@ describe("exec plugin", () => { }, }) expect(res.state).to.equal("outdated") + expect(res.version).to.equal(service.version) }) })