Skip to content

Commit de700ee

Browse files
committed
add debug logs, spinner should Error
1 parent 9cfe217 commit de700ee

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

packages/cli/src/oclif/commands/migrate.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
const _ = require('lodash');
2+
const debug = require('debug')('zapier:migrate');
23
const { Args, Flags } = require('@oclif/core');
34

45
const BaseCommand = require('../ZapierBaseCommand');
@@ -23,7 +24,7 @@ class MigrateCommand extends BaseCommand {
2324
true,
2425
);
2526
} catch (response) {
26-
this.stopSpinner();
27+
this.stopSpinner({ success: false });
2728

2829
// 409 from the backend specifically signals pre-checks failed
2930
if (response.status === 409) {
@@ -44,6 +45,8 @@ class MigrateCommand extends BaseCommand {
4445
if (!shouldContinuePreChecks) {
4546
this.error('Cancelled migration.');
4647
}
48+
} else {
49+
debug('Soft pre-checks before migration failed:', response.errText);
4750
}
4851
} finally {
4952
this.stopSpinner();

packages/cli/src/oclif/commands/promote.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
const _ = require('lodash');
2+
const debug = require('debug')('zapier:promote');
23
const colors = require('colors/safe');
34
const { Args, Flags } = require('@oclif/core');
45

@@ -59,7 +60,7 @@ class PromoteCommand extends BaseCommand {
5960
true,
6061
);
6162
} catch (response) {
62-
this.stopSpinner();
63+
this.stopSpinner({ success: false });
6364
// 409 from the backend specifically signals pre-checks failed
6465
if (response.status === 409) {
6566
const softCheckErrors = _.get(response, 'json.errors', []);
@@ -81,6 +82,8 @@ class PromoteCommand extends BaseCommand {
8182
if (!shouldContinuePreChecks) {
8283
this.error('Cancelled promote.');
8384
}
85+
} else {
86+
debug('Soft pre-checks before promotion failed:', response.errText);
8487
}
8588
} finally {
8689
this.stopSpinner();

0 commit comments

Comments
 (0)