diff --git a/lib/email.js b/lib/email.js index eb143a7..c8e3fde 100644 --- a/lib/email.js +++ b/lib/email.js @@ -1,5 +1,5 @@ const nodemailer = require('nodemailer') -const fs = require('fs/promises') +const fs = require('fs') const path = require('path') const config = require('../config') @@ -9,7 +9,7 @@ async function getEmailConfig(name, tag) { const file = path.join(__dirname, '..', 'dockerfiles', name, tag, 'email.js') try { - await fs.access(file, fs.constants.R_OK) + await fs.promises.access(file, fs.constants.R_OK) logger.log('[Email Config]', 'can access') } catch (err) { logger.log('[Email Config]', 'can not access', err) diff --git a/package.json b/package.json index 768b56d..0f735a7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "aliyun-docker-trigger", - "version": "1.2.1", + "version": "1.2.2", "description": "", "main": "index.js", "author": "",