diff options
| author | Anna Henningsen <[email protected]> | 2015-04-15 17:44:10 +0200 |
|---|---|---|
| committer | Anna Henningsen <[email protected]> | 2015-12-10 22:15:39 +0100 |
| commit | a67629c9de3395c353903effa000effd01458050 (patch) | |
| tree | 357fe6ffd47331b947e30036ed195090c1328c01 | |
| parent | 125d8b15e9fd8e6c9c67f4d54f12ea72b87049a3 (diff) | |
| download | node-coveralls-a67629c9de3395c353903effa000effd01458050.tar.xz node-coveralls-a67629c9de3395c353903effa000effd01458050.zip | |
Use index.options object for determining getOptions()’ filepath
| -rw-r--r-- | lib/getOptions.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/getOptions.js b/lib/getOptions.js index 78f1bf3..4c53e36 100644 --- a/lib/getOptions.js +++ b/lib/getOptions.js @@ -1,6 +1,7 @@ var fs = require('fs'); var path = require('path'); var yaml = require('js-yaml'); +var index = require('../index'); var logger = require('./logger')(); var fetchGitData = require('./fetchGitData'); @@ -128,9 +129,8 @@ var getOptions = function(cb, _userOptions){ var userOptions = _userOptions || {}; getBaseOptions(function(err, options){ - // try to get filepath from the command-line - // look into all command line arguments from index 2 which don't start with - - var firstNonOptionArgument = process.argv.slice(2).filter(RegExp.prototype.test.bind(/^[^-]/))[0]; + // minimist populates options._ with non-option command line arguments + var firstNonOptionArgument = index.options._[0]; if (firstNonOptionArgument) options.filepath = firstNonOptionArgument; |
