Skip to content

Commit

Permalink
Replace process.exit with an else block (#567)
Browse files Browse the repository at this point in the history
The `process.exit` replaced a `return`that was failing a lint check, but ended up causing the generator to quit before the generation was complete.
  • Loading branch information
Eric Koleda authored and jmdobry committed May 5, 2016
1 parent 8992956 commit d99ca56
Showing 1 changed file with 11 additions and 12 deletions.
23 changes: 11 additions & 12 deletions scripts/generate.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,19 +37,18 @@ if (args.length) {
console.log('Generated API for ' + url);
});
});
process.exit(0);
}

console.log('Removing old APIs...');
rimraf(path.join(__dirname, '..', 'apis'), function (err) {
if (err) {
throw err;
}
console.log('Generating APIs...');
gen.generateAllAPIs(function (err) {
} else {
console.log('Removing old APIs...');
rimraf(path.join(__dirname, '..', 'apis'), function (err) {
if (err) {
throw err;
}
console.log('Finished generating APIs!');
console.log('Generating APIs...');
gen.generateAllAPIs(function (err) {
if (err) {
throw err;
}
console.log('Finished generating APIs!');
});
});
});
}

0 comments on commit d99ca56

Please sign in to comment.