Skip to content
代码片段 群组 项目
未验证 提交 9b047991 编辑于 作者: paulr34's avatar paulr34 提交者: GitHub
浏览文件

Uccli upgrade fix (#990)

* Gathering the files before checking them

* Adding check to make sure the user entered required arguments defined in the spec
上级 fb62642c
No related branches found
No related tags found
无相关合并请求
......@@ -177,7 +177,13 @@ function gatherFiles(filesArg, options = { suffix: '.zap', doBlank: true }) {
* @param {*} output
*/
async function startConvert(argv, options) {
let files = argv.zapFiles
let zapFiles = argv.zapFiles
let files = gatherFiles(zapFiles, { suffix: '.zap', doBlank: true })
if (files.length == 0) {
options.logger(` 👎 no zap files found in: ${zapFiles}`)
throw `👎 no zap files found in: ${zapFiles}`
}
if (argv.output == null) throw 'You need to specify output file.'
let output = argv.output
let conversion_results = argv.results
options.logger(`🤖 Conversion started
......@@ -780,9 +786,6 @@ async function startUpMainInstance(argv, callbacks) {
} else if (argv._.includes('server')) {
return startServer(argv, quitFunction)
} else if (argv._.includes('convert')) {
if (argv.zapFiles.length < 1)
throw 'You need to specify at least one zap file.'
if (argv.output == null) throw 'You need to specify output file.'
return startConvert(argv, {
logger: console.log,
quitFunction: quitFunction,
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册