Skip to content

Commit be08907

Browse files
authoredMay 5, 2020
fix: make cwd argument optional again (#735)
1 parent a6adb3b commit be08907

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎src/configLoader/loader.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ export default loader;
1414
/**
1515
* Get content of the configuration file
1616
* @param {String} config - partial path to configuration file
17-
* @param {String} cwd - directory path which will be joined with config argument
17+
* @param {String} [cwd = process.cwd()] - directory path which will be joined with config argument
1818
* @return {Object|undefined}
1919
*/
2020
function loader (configs, config, cwd) {
2121
var content;
22-
var directory = cwd;
22+
var directory = cwd || process.cwd();
2323

2424
// If config option is given, attempt to load it
2525
if (config) {

0 commit comments

Comments
 (0)
Please sign in to comment.