Skip to content

Commit eb605e2

Browse files
committed
Add enableFallbacks() method.
1 parent d85c68e commit eb605e2

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

lib/getenv.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,4 +108,8 @@ getenv.disableFallbacks = function() {
108108
fallbacksDisabled = true;
109109
};
110110

111+
getenv.enableFallbacks = function() {
112+
fallbacksDisabled = false;
113+
};
114+
111115
module.exports = getenv;

test/fallbacks.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ tests['getenv.disableFallbacks() makes relying on fallbacks an error'] = functio
1010
assert.throws(function() {
1111
getenv.string("url", "http://localhost");
1212
});
13+
getenv.enableFallbacks();
1314
};
1415

1516

0 commit comments

Comments
 (0)