diff --git a/lib/commands/doctor/checks/system-stack.js b/lib/commands/doctor/checks/system-stack.js index 9e9ac8957..fefbdbf01 100644 --- a/lib/commands/doctor/checks/system-stack.js +++ b/lib/commands/doctor/checks/system-stack.js @@ -5,7 +5,7 @@ const {SystemError} = require('../../../errors'); const taskTitle = 'Checking system compatibility'; const nginxProgramName = process.env.NGINX_PROGRAM_NAME || 'nginx'; -const versionRegex = /^(?:16|18|20)/; +const versionRegex = /^(?:16|18|20|22)/; async function hasService(name) { try { @@ -23,7 +23,7 @@ async function checkSystem(ctx) { const {distro, release} = await sysinfo.osInfo(); if (distro !== 'Ubuntu' || !versionRegex.test(release)) { - throw new Error('Linux version is not Ubuntu 16, 18, or 20'); + throw new Error('Linux version is not Ubuntu 16, 18, 20, or 22'); } const missing = []; diff --git a/test/unit/commands/doctor/checks/system-stack-spec.js b/test/unit/commands/doctor/checks/system-stack-spec.js index 147ae6587..bffde2ff0 100644 --- a/test/unit/commands/doctor/checks/system-stack-spec.js +++ b/test/unit/commands/doctor/checks/system-stack-spec.js @@ -88,7 +88,7 @@ describe('Unit: Doctor Checks > systemStack', function () { await systemStack.task(ctx); } catch (error) { expect(error).to.be.an.instanceof(SystemError); - expect(error.message).to.equal('System stack checks failed with message: \'Linux version is not Ubuntu 16, 18, or 20\''); + expect(error.message).to.equal('System stack checks failed with message: \'Linux version is not Ubuntu 16, 18, 20, or 22\''); expect(osInfo.calledOnce).to.be.true; expect(logStub.calledOnce).to.be.true; expect(logStub.args[0][0]).to.match(/failed with message/); @@ -114,7 +114,7 @@ describe('Unit: Doctor Checks > systemStack', function () { await systemStack.task(ctx); } catch (error) { expect(error).to.be.an.instanceof(SystemError); - expect(error.message).to.equal('System stack checks failed with message: \'Linux version is not Ubuntu 16, 18, or 20\''); + expect(error.message).to.equal('System stack checks failed with message: \'Linux version is not Ubuntu 16, 18, 20, or 22\''); expect(osInfo.calledOnce).to.be.true; expect(logStub.calledOnce).to.be.true; expect(logStub.args[0][0]).to.match(/failed with message/);