Problema de comillas en .env
This commit is contained in:
@@ -30,11 +30,7 @@ async function loadEnv(envpath?: string) {
|
||||
const env = process.env
|
||||
const envPath = envpath;
|
||||
if (envPath != undefined && existsSync(envPath)) {
|
||||
const content = await fs.readFile(envPath, 'utf-8');
|
||||
content.split('\n').forEach(line => {
|
||||
const [key, value] = line.split('=');
|
||||
if (key && value) process.env[key.trim()] = value.trim();
|
||||
});
|
||||
process.loadEnvFile(envpath)
|
||||
console.log('[i] Archivo .env cargado desde ' + envpath);
|
||||
console.log("ENV:", env)
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user