Skip to content

Commit 1a259cd

Browse files
committed
Resolve configuration file to absolute path before loading
1 parent ad2e5d4 commit 1a259cd

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

index.js

+3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
1+
var path = require('path');
12
var configFilePath = process.argv[2];
23
var config = {};
34

45
if (configFilePath) {
6+
configFilePath = path.resolve(configFilePath);
7+
58
try {
69
config = require(configFilePath);
710
} catch(e) {

0 commit comments

Comments
 (0)