Skip to content

Commit b77aa88

Browse files
Merge pull request #1983 from contentstack/fix/export-module
Skip stack settings export when using a management token
2 parents 4baa583 + e4e374c commit b77aa88

File tree

1 file changed

+5
-1
lines changed
  • packages/contentstack-export/src/export/modules

1 file changed

+5
-1
lines changed

packages/contentstack-export/src/export/modules/stack.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,17 @@ export default class ExportStack extends BaseClass {
2727

2828
async start(): Promise<void> {
2929
if (isAuthenticated()) {
30-
await this.exportStackSettings();
3130
const stackData = await this.getStack();
3231
if (stackData?.org_uid) {
3332
this.exportConfig.org_uid = stackData.org_uid;
3433
this.exportConfig.sourceStackName = stackData.name;
3534
}
3635
}
36+
if (this.exportConfig.management_token) {
37+
log(this.exportConfig, 'Skipping stack settings export: Operation is not supported when using a management token.', 'info');
38+
} else {
39+
await this.exportStackSettings();
40+
}
3741
if (!this.exportConfig.preserveStackVersion && !this.exportConfig.hasOwnProperty('master_locale')) {
3842
//fetch master locale details
3943
return this.getLocales();

0 commit comments

Comments
 (0)