Skip to content

Commit 9abafc8

Browse files
committed
feat: skip authKey check for non-lwc case
1 parent fa17b29 commit 9abafc8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/commands/omnistudio/migration/migrate.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ export default class Migrate extends OmniStudioBaseCommand {
259259
}
260260
}
261261

262-
const deploymentConfig = await this.getAutoDeployConsent();
262+
const deploymentConfig = await this.getAutoDeployConsent(objectsToProcess.includes(Constants.LWC));
263263
let projectPath: string;
264264
let targetApexNamespace: string;
265265
// Check for general consent to make modifications with OMT
@@ -281,7 +281,7 @@ export default class Migrate extends OmniStudioBaseCommand {
281281
return { objectsToProcess, projectPath, targetApexNamespace, deploymentConfig };
282282
}
283283

284-
private async getAutoDeployConsent(): Promise<{ autoDeploy: boolean; authKey: string | undefined }> {
284+
private async getAutoDeployConsent(includeLwc: boolean): Promise<{ autoDeploy: boolean; authKey: string | undefined }> {
285285
const askWithTimeOut = PromptUtil.askWithTimeOut(messages);
286286
let validResponse = false;
287287
let consent = false;
@@ -310,7 +310,7 @@ export default class Migrate extends OmniStudioBaseCommand {
310310
autoDeploy: consent,
311311
authKey: undefined,
312312
};
313-
if (consent) {
313+
if (consent && includeLwc) {
314314
deploymentConfig.authKey = process.env[authEnvKey];
315315
if (!deploymentConfig.authKey) {
316316
Logger.error(messages.getMessage('authKeyEnvVarNotSet'));

0 commit comments

Comments
 (0)