From f965bf456a6241be5ea7d7f79437fdd3678fbe6a Mon Sep 17 00:00:00 2001 From: hacksalot Date: Mon, 11 Jan 2016 20:52:07 -0500 Subject: [PATCH] Fix JSON file loading glitch with --options. --- src/cli/main.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/cli/main.js b/src/cli/main.js index 64c825f..c719786 100644 --- a/src/cli/main.js +++ b/src/cli/main.js @@ -24,7 +24,7 @@ Definition of the `main` function. , StringUtils = require('../utils/string.js') , _ = require('underscore') , OUTPUT = require('./out') - , SAFELOAD = require('../utils/safe-json-loader') + , SAFELOADJSON = require('../utils/safe-json-loader') , PAD = require('string-padding') , Command = require('commander').Command; @@ -176,8 +176,9 @@ Definition of the `main` function. //var myJSON = JSON.parse(optStr); if( optStr[0] === '{') oJSON = eval('(' + optStr + ')'); // jshint ignore:line - else - oJSON = SAFELOAD.loadSafeJson( optStr ); + else { + oJSON = SAFELOADJSON( optStr ); + } } } }