From 668baa9e0033ac98b503a040eba6da267ab70684 Mon Sep 17 00:00:00 2001 From: rosen-vladimirov Date: Fri, 5 Jul 2019 13:59:13 +0300 Subject: [PATCH] fix: migrate command failure should be handled correctly In case migrate command fails to migrate the project, currently it shows some generic message without saying what is the actual error. Also the command exits with code 0, which is indication it had succeeded. Fix this by failing with more descriptive error message and exit code that is not 0. --- lib/controllers/migrate-controller.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/controllers/migrate-controller.ts b/lib/controllers/migrate-controller.ts index 67da41c784..ed27332327 100644 --- a/lib/controllers/migrate-controller.ts +++ b/lib/controllers/migrate-controller.ts @@ -108,7 +108,7 @@ export class MigrateController extends UpdateControllerBase implements IMigrateC await this.migrateDependencies(projectData); } catch (error) { this.restoreBackup(MigrateController.folders, backupDir, projectData.projectDir); - this.$logger.error(MigrateController.migrateFailMessage); + this.$errors.failWithoutHelp(`${MigrateController.migrateFailMessage} The error is: ${error}`); } }