From 934d8a612343fdfa74849863188a841c1b1682c9 Mon Sep 17 00:00:00 2001 From: hacksalot Date: Fri, 15 Jan 2016 13:36:20 -0500 Subject: [PATCH] Update --options file loading. --- src/cli/main.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/cli/main.js b/src/cli/main.js index 2a71b00..bcc0e03 100644 --- a/src/cli/main.js +++ b/src/cli/main.js @@ -98,7 +98,8 @@ Definition of the `main` function. .arguments('') .description('Peek at a resume field or section') .action(function( sources, sectionOrField ) { - execute.call( this, sources, [ sources.pop() ], this.opts(), logMsg); + var dst = (sources && sources.length > 1) ? [sources.pop()] : []; + execute.call( this, sources, dst, this.opts(), logMsg); }); // Create the BUILD command @@ -197,7 +198,9 @@ Definition of the `main` function. if( optStr[0] === '{') oJSON = eval('(' + optStr + ')'); // jshint ignore:line else { - oJSON = safeLoadJSON( optStr ); + var inf = safeLoadJSON( optStr ); + if( !inf.ex ) + oJSON = inf.json; // TODO: Error handling } }