Skip to content

Commit aa091f0

Browse files
committed
fix: show console issue
1 parent 39a8ee0 commit aa091f0

File tree

2 files changed

+5
-7
lines changed
  • packages
    • contentstack-export/src/commands/cm/stacks
    • contentstack-import/src/commands/cm/stacks

2 files changed

+5
-7
lines changed

packages/contentstack-export/src/commands/cm/stacks/export.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import {
1414
handleAndLogError,
1515
getLogPath,
1616
CLIProgressManager,
17-
clearProgressModuleSetting
17+
clearProgressModuleSetting,
1818
} from '@contentstack/cli-utilities';
1919

2020
import { ModuleExporter } from '../../../export';
@@ -135,9 +135,6 @@ export default class ExportCommand extends Command {
135135
const moduleExporter = new ModuleExporter(managementAPIClient, exportConfig);
136136
await moduleExporter.start();
137137

138-
// Clear progress module setting now that export is complete
139-
clearProgressModuleSetting();
140-
141138
if (!exportConfig.branches?.length) {
142139
writeExportMetaFile(exportConfig);
143140
}
@@ -153,6 +150,8 @@ export default class ExportCommand extends Command {
153150
if (!configHandler.get('log')?.showConsoleLogs) {
154151
cliux.print(`The log has been stored at '${getLogPath()}'`, { color: 'green' });
155152
}
153+
// Clear progress module setting now that export is complete
154+
clearProgressModuleSetting();
156155
} catch (error) {
157156
// Clear progress module setting even on error
158157
clearProgressModuleSetting();

packages/contentstack-import/src/commands/cm/stacks/import.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -183,9 +183,6 @@ export default class ImportCommand extends Command {
183183
const result = await moduleImporter.start();
184184
backupDir = importConfig.backupDir;
185185

186-
// Clear progress module setting now that import is complete
187-
clearProgressModuleSetting();
188-
189186
if (!result?.noSuccessMsg) {
190187
const successMessage = importConfig.stackName
191188
? `Successfully imported the content to the stack named ${importConfig.stackName} with the API key ${importConfig.apiKey} .`
@@ -195,6 +192,8 @@ export default class ImportCommand extends Command {
195192

196193
CLIProgressManager.printGlobalSummary();
197194
this.logSuccessAndBackupMessages(backupDir, importConfig);
195+
// Clear progress module setting now that import is complete
196+
clearProgressModuleSetting();
198197
} catch (error) {
199198
// Clear progress module setting even on error
200199
clearProgressModuleSetting();

0 commit comments

Comments
 (0)