Skip to content
代码片段 群组 项目
提交 ae5793f8 编辑于 作者: Timotej Ecimovic's avatar Timotej Ecimovic
浏览文件

Make license checker properly return non-zero error code if it fails.

上级 ab7e790b
No related branches found
No related tags found
无相关合并请求
......@@ -26,7 +26,7 @@ let whiteList = fs
.toString()
.split('\n')
let fail = false
checker.init(args, function (err, json) {
checker.init(args, (err, json) => {
for (x in json) {
let license = json[x].licenses
if (!x.includes('zap@') && !whiteList.includes(license.toString())) {
......@@ -41,8 +41,9 @@ checker.init(args, function (err, json) {
}
}
if (fail) {
console.log('License check FAILED')
console.log('⛔ License check FAILED')
process.exit(1)
} else {
console.log('License check SUCCESS')
console.log('😎 License check SUCCESS')
}
})
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册