mirror of
https://github.com/JuanCanham/HackMyResume.git
synced 2024-11-22 16:30:11 +00:00
Fix JSON file loading glitch with --options.
This commit is contained in:
parent
69be38110f
commit
f965bf456a
@ -24,7 +24,7 @@ Definition of the `main` function.
|
|||||||
, StringUtils = require('../utils/string.js')
|
, StringUtils = require('../utils/string.js')
|
||||||
, _ = require('underscore')
|
, _ = require('underscore')
|
||||||
, OUTPUT = require('./out')
|
, OUTPUT = require('./out')
|
||||||
, SAFELOAD = require('../utils/safe-json-loader')
|
, SAFELOADJSON = require('../utils/safe-json-loader')
|
||||||
, PAD = require('string-padding')
|
, PAD = require('string-padding')
|
||||||
, Command = require('commander').Command;
|
, Command = require('commander').Command;
|
||||||
|
|
||||||
@ -176,8 +176,9 @@ Definition of the `main` function.
|
|||||||
//var myJSON = JSON.parse(optStr);
|
//var myJSON = JSON.parse(optStr);
|
||||||
if( optStr[0] === '{')
|
if( optStr[0] === '{')
|
||||||
oJSON = eval('(' + optStr + ')'); // jshint ignore:line
|
oJSON = eval('(' + optStr + ')'); // jshint ignore:line
|
||||||
else
|
else {
|
||||||
oJSON = SAFELOAD.loadSafeJson( optStr );
|
oJSON = SAFELOADJSON( optStr );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user