mirror of
https://github.com/JuanCanham/HackMyResume.git
synced 2024-11-05 09:56:22 +00:00
Handle args in mock/passthrough case.
This commit is contained in:
parent
9466a8c0dd
commit
47e8605f50
@ -31,7 +31,7 @@
|
|||||||
*/
|
*/
|
||||||
var main = module.exports = function( args ) {
|
var main = module.exports = function( args ) {
|
||||||
|
|
||||||
var args = initialize( args );
|
args = initialize( args );
|
||||||
|
|
||||||
// Create the top-level (application) command...
|
// Create the top-level (application) command...
|
||||||
var program = new Command('hackmyresume')
|
var program = new Command('hackmyresume')
|
||||||
@ -122,12 +122,12 @@
|
|||||||
/**
|
/**
|
||||||
Massage command-line args and setup Commander.js.
|
Massage command-line args and setup Commander.js.
|
||||||
*/
|
*/
|
||||||
function initialize( args ) {
|
function initialize( ar ) {
|
||||||
|
|
||||||
logMsg( title );
|
logMsg( title );
|
||||||
|
|
||||||
// Support case-insensitive sub-commands (build, generate, validate, etc.)..
|
// Support case-insensitive sub-commands (build, generate, validate, etc.)..
|
||||||
var oVerb, verb = '', args = args.slice(), cleanArgs = args.slice(2);
|
var oVerb, verb = '', args = ar.slice(), cleanArgs = args.slice(2);
|
||||||
if( cleanArgs.length ) {
|
if( cleanArgs.length ) {
|
||||||
var verbIdx = _.findIndex( cleanArgs, function(v){ return v[0] !== '-'; });
|
var verbIdx = _.findIndex( cleanArgs, function(v){ return v[0] !== '-'; });
|
||||||
if( verbIdx !== -1 ) {
|
if( verbIdx !== -1 ) {
|
||||||
|
Loading…
Reference in New Issue
Block a user