Skip to content

Commit c354d4b

Browse files
fix:import variables using stack
1 parent 8f17d14 commit c354d4b

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/adapters/base-class.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ export default class BaseClass {
318318
})
319319
.then((name) => find(listOfDeliveryTokens, { name }) as Record<string, any>);
320320
}
321-
this.config.environment = this.config.deliveryToken?.scope[0]?.environments[0]?.name;
321+
this.config.stackEnvironment = this.config.deliveryToken?.scope[0]?.environments[0]?.name;
322322
}
323323

324324
/**
@@ -599,7 +599,7 @@ export default class BaseClass {
599599
print([
600600
{ message: '?', color: 'green' },
601601
{ message: 'Stack Environment', bold: true },
602-
{ message: this.config.environment || '', color: 'cyan' },
602+
{ message: this.config.stackEnvironment || '', color: 'cyan' },
603603
]);
604604
await this.getCmsEnvironmentVariables();
605605

@@ -613,7 +613,7 @@ export default class BaseClass {
613613
}
614614
break;
615615
case 'CONTENTSTACK_ENVIRONMENT':
616-
variable.value = this.config.environment;
616+
variable.value = this.config.stackEnvironment;
617617
break;
618618
case 'CONTENTSTACK_API_KEY':
619619
variable.value = this.config.selectedStack.api_key;

src/types/launch.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ type ConfigType = {
4242
authtoken?: string;
4343
deployment?: string;
4444
environment?: string;
45+
stackEnvironment?: string;
4546
provider?: Providers;
4647
fileUploadMethod?: FileUploadMethod;
4748
authorization?: string;

0 commit comments

Comments
 (0)