diff --git a/core/src/plugins/exec.ts b/core/src/plugins/exec.ts index 4f3c640f29..d821090d7a 100644 --- a/core/src/plugins/exec.ts +++ b/core/src/plugins/exec.ts @@ -459,9 +459,13 @@ export const getExecServiceStatus: ServiceActionHandlers["getServiceStatus"] = a shell: true, }) - 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) }) })