fix(cli): upgrade error in node v14

This commit is contained in:
chenos 2022-06-17 14:21:56 +08:00
parent 34e17004c5
commit 8514953157

View File

@ -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];
};