22 lines
1.0 KiB
JavaScript
22 lines
1.0 KiB
JavaScript
// # Source: https://github.com/sudojia/AutoTaskScript/blob/script/src/utils/envCheck.js
|
||
// # Raw: https://raw.githubusercontent.com/sudojia/AutoTaskScript/script/src/utils/envCheck.js
|
||
// # Repo: sudojia/AutoTaskScript
|
||
// # Path: src/utils/envCheck.js
|
||
// # UploadedAt: 2025-04-28T19:26:13+08:00
|
||
// # SHA256: b178db50f991ceec4559da64031ac67925b2a1d2dcbe1070c970a5e6f6b88728
|
||
// # Category: APP版/抓包
|
||
// # Evidence: cookie/token/authorization/header
|
||
//
|
||
|
||
module.exports = async function checkUpdate(prefix, list) {
|
||
if (JSON.stringify(process.env).indexOf('GITHUB') > -1) {
|
||
console.log('\n不建议使用 GitHub Actions 方式运行脚本\n推荐使用青龙面板');
|
||
console.log('服务器推荐:https://github.com/sudojia/AutoTaskScript?tab=readme-ov-file#%E6%9C%8D%E5%8A%A1%E5%99%A8%E6%8E%A8%E8%8D%90');
|
||
// process.exit(0);
|
||
}
|
||
if (!list || list.length === 0) {
|
||
console.error(`\n未配置环境变量...`);
|
||
process.exit(1);
|
||
}
|
||
console.log(`\n开始执行${prefix}`);
|
||
} |