Fix dotenv import
This commit is contained in:
3
index.js
3
index.js
@@ -1,5 +1,6 @@
|
||||
import { execSync, spawn } from 'child_process';
|
||||
import { publicIpv4 } from 'public-ip';
|
||||
import dotenv from 'dotenv';
|
||||
import fs from 'fs';
|
||||
import os from 'os';
|
||||
|
||||
@@ -302,7 +303,7 @@ async function runBatch(vpn) {
|
||||
(async () => {
|
||||
await checkUpdate();
|
||||
if (fs.existsSync('.env')) {
|
||||
require('dotenv').config({ path: '.env' });
|
||||
dotenv.config({ path: '.env' });
|
||||
logManager(`[${host}] Config file: .env.`, 'info');
|
||||
}
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user