Files
qinglong/脚本库/APP版/抓包/envCheck/2025-04-28_envCheck_b178db50.js
2026-05-24 05:33:05 +00:00

22 lines
1.0 KiB
JavaScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
// # 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}`);
}