refactor: pacpath重构

This commit is contained in:
xiaojunnuo
2021-08-11 14:53:43 +08:00
parent 53f199a4a9
commit 13d34a025b
10 changed files with 24 additions and 15 deletions

View File

@@ -8,8 +8,9 @@ function createPacClient (pacFilePath) {
function readFile (location) {
try {
log.info('pac root dir', path.resolve('./'))
const filePath = path.resolve(location)
log.debug('read pac path:', filePath)
log.info('read pac path:', filePath)
return fs.readFileSync(location).toString()
} catch (e) {
log.error('读取pac失败')