1
0
mirror of https://github.com/JuanCanham/HackMyResume.git synced 2025-07-09 19:51:07 +01:00

Detect bad option files supplied via --options.

This commit is contained in:
hacksalot
2018-01-29 02:04:00 -05:00
parent 12a14dadeb
commit 17259cedbf
19 changed files with 149 additions and 13 deletions

View File

@ -66,7 +66,7 @@ _peekOne = ( t, objPath ) ->
## safeLoadJSON can only return a READ error or a PARSE error
pkgError = null
if obj.ex
errCode = if obj.ex.operation == 'parse' then HMSTATUS.parseError else HMSTATUS.readError
errCode = if obj.ex.op == 'parse' then HMSTATUS.parseError else HMSTATUS.readError
if errCode == HMSTATUS.readError
obj.ex.quiet = true
pkgError = fluenterror: errCode, inner: obj.ex

View File

@ -83,7 +83,7 @@ _validateOne = (t, validator, schemas, opts) ->
# If failure, package JSON read/parse errors
else
if obj.ex.operation == 'parse'
if obj.ex.op == 'parse'
errCode = HMSTATUS.parseError
ret.status = 'broken'
else