Skip to content

Commit

Permalink
fix(cli): 低版本的 node 8 无法在 vm 中使用 ...spread 语法
Browse files Browse the repository at this point in the history
正常以 .js 为后缀的 node 模块不受影响,可以正常运行
  • Loading branch information
yuche committed Feb 22, 2019
1 parent 9b06ffe commit 9e0d352
Showing 1 changed file with 8 additions and 12 deletions.
20 changes: 8 additions & 12 deletions packages/taro-cli/bin/taro-info
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,13 @@ function rnInfo (options) {
}

async function info (options) {
let info = await envinfo.run(
{
System: ['OS', 'Shell'],
Binaries: ['Node', 'Yarn', 'npm'],
npmPackages,
npmGlobalPackages: ['typescript'],
...options
},
{
title: `Taro CLI ${getPkgVersion()} environment info`
}
)
let info = await envinfo.run(Object.assign({}, {
System: ['OS', 'Shell'],
Binaries: ['Node', 'Yarn', 'npm'],
npmPackages,
npmGlobalPackages: ['typescript']
}, options), {
title: `Taro CLI ${getPkgVersion()} environment info`
})
console.log(info)
}

0 comments on commit 9e0d352

Please sign in to comment.