Skip to content

Commit

Permalink
Allow for getEnv fallback of empty strings
Browse files Browse the repository at this point in the history
  • Loading branch information
dannyvink committed Mar 24, 2018
1 parent 83dddc1 commit e3c1b79
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/confi.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ const load = async(options) => {
readFile,
getEnv(key, fallback) {
const env = process.env[key] || fallback;
if (!env) {
if (env == null) {
throw new Error(`Environment variable ${key} was not found and no fallback was specified`);
}
return env;
Expand Down

0 comments on commit e3c1b79

Please sign in to comment.