不要怂,就是干,撸起袖子干!

Commit 35d18dac by edgarsilva

Fix issue with options file (--options-path) relative path not working.

1 parent 798ecb12
Showing with 10 additions and 2 deletions
......@@ -18,7 +18,7 @@ var configuration = {
var loadDefaultOptions = function(pathToOptionsFile) {
try {
var options = require(path.resolve(process.cwd(), '/', pathToOptionsFile))
var options = require(pathToOptionsFile);
Object.keys(options).forEach(function(key) {
program[key] = options[key]
......@@ -194,7 +194,15 @@ program
.parse(process.argv)
if(typeof program.optionsPath === 'string') {
loadDefaultOptions(program.optionsPath);
var optionsFilesPath = null;
if (isRelativePath(program.optionsPath)) {
optionsFilePath = path.join(process.cwd(), program.optionsPath);
} else {
optionsFilePath = program.optionsPath;
}
loadDefaultOptions(optionsFilePath);
}
if(typeof program.config === 'string') {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!