提交 0f4a9d4a 编写于 作者: U ULIVZ

chore($core): cut off process log when resolving unknown commands

上级 74d3a5ce
......@@ -35,6 +35,7 @@ module.exports = async function (cli, options) {
sourceDir = pwd
}
/* Prepare Context START */
logger.setOptions({ logLevel: 1 })
if (sourceDir) {
......@@ -44,6 +45,7 @@ module.exports = async function (cli, options) {
}
logger.setOptions({ logLevel: 3 })
/* Prepare Context END */
}
}
......@@ -104,12 +106,19 @@ function registerUnknownCommands (cli, options) {
logger.debug('Custom command', chalk.cyan(commandName))
CLI({
async beforeParse (subCli) {
/* Prepare Context START */
logger.setOptions({ logLevel: 1 })
const app = createApp({
sourceDir: sourceDir,
...options,
...commandoptions
})
await app.process()
logger.setOptions({ logLevel: 3 })
/* Prepare Context END */
app.pluginAPI.applySyncOption('extendCli', subCli, app)
console.log()
},
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册