Skip to content

Commit 668baa9

Browse files
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.
1 parent 3718079 commit 668baa9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/controllers/migrate-controller.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ export class MigrateController extends UpdateControllerBase implements IMigrateC
108108
await this.migrateDependencies(projectData);
109109
} catch (error) {
110110
this.restoreBackup(MigrateController.folders, backupDir, projectData.projectDir);
111-
this.$logger.error(MigrateController.migrateFailMessage);
111+
this.$errors.failWithoutHelp(`${MigrateController.migrateFailMessage} The error is: ${error}`);
112112
}
113113
}
114114

0 commit comments

Comments
 (0)