1
0
mirror of https://github.com/JuanCanham/HackMyResume.git synced 2025-05-15 10:07:07 +01:00

Reconnect process exit codes.

This commit is contained in:
hacksalot
2016-01-18 20:06:45 -05:00
parent 23cd52885b
commit 2f628f8564
9 changed files with 46 additions and 25 deletions

View File

@ -40,20 +40,20 @@ Implementation of the 'convert' verb for HackMyResume.
function convert( srcs, dst, opts ) {
// Housekeeping
if( !srcs || !srcs.length ) { throw { fluenterror: 6 }; }
if( !srcs || !srcs.length ) { throw { fluenterror: 6, quit: true }; }
if( !dst || !dst.length ) {
if( srcs.length === 1 ) {
throw { fluenterror: HMSTATUS.inputOutputParity };
throw { fluenterror: HMSTATUS.inputOutputParity, quit: true };
}
else if( srcs.length === 2 ) {
dst = dst || []; dst.push( srcs.pop() );
}
else {
throw { fluenterror: HMSTATUS.inputOutputParity };
throw { fluenterror: HMSTATUS.inputOutputParity, quit: true };
}
}
if(srcs && dst && srcs.length && dst.length && srcs.length !== dst.length){
throw { fluenterror: HMSTATUS.inputOutputParity };
throw { fluenterror: HMSTATUS.inputOutputParity, quit: true };
}
// Load source resumes