backend-manager 4.0.6 → 4.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/cli/cli.js +15 -2
package/package.json
CHANGED
package/src/cli/cli.js
CHANGED
|
@@ -668,8 +668,10 @@ Main.prototype.setup = async function () {
|
|
|
668
668
|
Main.prototype.test = async function(name, fn, fix, args) {
|
|
669
669
|
const self = this;
|
|
670
670
|
let status;
|
|
671
|
-
|
|
671
|
+
|
|
672
672
|
return new Promise(async function(resolve, reject) {
|
|
673
|
+
let passed = await fn();
|
|
674
|
+
|
|
673
675
|
if (passed instanceof Error) {
|
|
674
676
|
log(chalk.red(passed));
|
|
675
677
|
process.exit(0);
|
|
@@ -685,10 +687,21 @@ Main.prototype.test = async function(name, fn, fix, args) {
|
|
|
685
687
|
if (!passed) {
|
|
686
688
|
log(chalk.yellow(`Fixing...`));
|
|
687
689
|
fix(self, args)
|
|
688
|
-
.then(
|
|
690
|
+
.then((r) => {
|
|
689
691
|
log(chalk.green(`...done~!`));
|
|
690
692
|
resolve();
|
|
691
693
|
})
|
|
694
|
+
.catch((e) => {
|
|
695
|
+
if (self.options['--continue']) {
|
|
696
|
+
log(chalk.yellow('⚠️ Continuing despite error because of --continue flag\n'));
|
|
697
|
+
setTimeout(function () {
|
|
698
|
+
resolve();
|
|
699
|
+
}, 5000);
|
|
700
|
+
} else {
|
|
701
|
+
log(chalk.yellow('To force the setup to continue, run with the --continue flag\n'));
|
|
702
|
+
reject();
|
|
703
|
+
}
|
|
704
|
+
})
|
|
692
705
|
} else {
|
|
693
706
|
resolve();
|
|
694
707
|
}
|