Skip to content

Commit bcf729b

Browse files
committed
build: 添加 json5 依赖检查
- 增加了对 json5 依赖的检查 - 如果未安装 json5,将输出错误信息并退出进程 -确保了构建过程中所需的依赖都已正确安装
1 parent a04e7ea commit bcf729b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

source/OSSLicensesBuilder.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,10 @@ function main() {
9696
console.error('请先安装 license-checker-rseidelsohn: yarn add license-checker-rseidelsohn');
9797
process.exit(1);
9898
}
99+
if (!shell.which('json5')) {
100+
console.error('请先安装 json5: yarn add json5');
101+
process.exit(1);
102+
}
99103
const configPath = path.join(__dirname, 'OSSLicensesBuilderConfig.json5');
100104
if (!fs.existsSync(configPath)) {
101105
console.error(`找不到配置文件: ${configPath}`);

0 commit comments

Comments
 (0)