diff --git a/packages/core/cli/src/util.js b/packages/core/cli/src/util.js index 21b5a7880f..f9eff5d8e8 100644 --- a/packages/core/cli/src/util.js +++ b/packages/core/cli/src/util.js @@ -138,6 +138,6 @@ exports.updateJsonFile = async (target, fn) => { exports.getVersion = async () => { const { stdout } = await execa('npm', ['v', '@nocobase/app-server', 'versions']); - const versions = new Function(`return ${stdout}`)(); + const versions = new Function(`return (${stdout})`)(); return versions[versions.length - 1]; };