Fix error handling in the command

This commit is contained in:
Mohammad Fares 2018-10-14 21:56:12 +03:00
parent e304c37012
commit 0dfaa5d00d
1 changed files with 5 additions and 2 deletions

View File

@ -137,10 +137,13 @@ function done() {
// Store the data into the recording file
try {
di.fs.writeFileSync(recordingFile, outputYAML, 'utf8');
} catch (error) {
di.errorHandler(error.message);
process.exit();
return di.errorHandler(error);
}
console.log(di.chalk.green('Successfully Recorded'));