Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
return safefs.exists(configPath, function(exists) {
if (!exists) {
return complete();
}
return require('envfile').parseFile(configPath, function(err, data) {
var key, value;
if (err) {
return complete(err);
}
for (key in data) {
if (!__hasProp.call(data, key)) continue;
value = data[key];
process.env[key] = value;
}
docpad.log('debug', util.format(locale.loadingEnvConfig, configPath));
return complete();
});
});
});
return safefs.exists(configPath, function(exists) {
if (!exists) {
return complete();
}
return require('envfile').parseFile(configPath, function(err, data) {
var key, value;
if (err) {
return complete(err);
}
for (key in data) {
if (!__hasProp.call(data, key)) continue;
value = data[key];
process.env[key] = value;
}
docpad.log('debug', util.format(locale.loadingEnvConfig, configPath));
return complete();
});
});
});