添加云函数 特有环境变量DEBUG

This commit is contained in:
lxk0301
2021-03-27 10:23:12 +08:00
parent 557c274909
commit 1798c314f6

View File

@ -262,6 +262,9 @@ function downloadUrl(url = 'https://raw.githubusercontent.com/NobyDa/Script/mast
function requireConfig() {
return new Promise(resolve => {
const file = 'jd_bean_sign.js';
if (process.env.TENCENTCLOUD_RUNENV === 'SCF') {
console.log(`云函数 特有环境变量DEBUG${process.env.TENCENTCLOUD_RUNENV}`)
}
fs.access(file, fs.constants.W_OK, (err) => {
resultPath = err ? '/tmp/result.txt' : resultPath;
JD_DailyBonusPath = err ? '/tmp/JD_DailyBonus.js' : JD_DailyBonusPath;