From 0dfaa5d00d2822b9b341c00dcaa30bb7cd865dd9 Mon Sep 17 00:00:00 2001 From: Mohammad Fares Date: Sun, 14 Oct 2018 21:56:12 +0300 Subject: [PATCH] Fix error handling in the command --- commands/record.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/commands/record.js b/commands/record.js index 70cf822..1309ebf 100644 --- a/commands/record.js +++ b/commands/record.js @@ -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'));