Skip to content

Commit

Permalink
ecsInitialization fix for desktop (#1039)
Browse files Browse the repository at this point in the history
Co-authored-by: amitjoshi <[email protected]>
  • Loading branch information
amitjoshi438 and amitjoshi authored Sep 11, 2024
1 parent 0912e35 commit 669d801
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
11 changes: 6 additions & 5 deletions src/client/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -185,10 +185,6 @@ export async function activate(
const pacTerminal = new PacTerminal(_context, _telemetry, cliPath);
_context.subscriptions.push(cli);
_context.subscriptions.push(pacTerminal);
const workspaceFolders =
vscode.workspace.workspaceFolders?.map(
(fl) => ({ ...fl, uri: fl.uri.fsPath } as WorkspaceFolder)
) || [];

_context.subscriptions.push(
orgChangeEvent(async (orgDetails: ActiveOrgOutput) => {
Expand All @@ -213,7 +209,7 @@ export async function activate(
TenantID: TenantID[0].Value,
Region: artemisResponse.stamp
},
PowerPagesClientName);
PowerPagesClientName, true);
}

oneDSLoggerWrapper.instantiate(geoName, geoLongName);
Expand All @@ -226,6 +222,11 @@ export async function activate(
})
);


const workspaceFolders =
vscode.workspace.workspaceFolders?.map(
(fl) => ({ ...fl, uri: fl.uri.fsPath } as WorkspaceFolder)
) || [];
// TODO: Handle for VSCode.dev also
if (workspaceContainsPortalConfigFolder(workspaceFolders)) {
let telemetryData = '';
Expand Down
4 changes: 2 additions & 2 deletions src/common/ecs-features/ecsFeatureClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ export abstract class ECSFeaturesClient {

// Initialize ECSFeatureClient - any client config can be fetched with utility function like below
// EnableMultifileVscodeWeb.getConfig().enableMultifileVscodeWeb
public static async init(telemetry: ITelemetry | TelemetryReporter, filters: ECSAPIFeatureFlagFilters, clientName: string) {
if (this._ecsConfig) return;
public static async init(telemetry: ITelemetry | TelemetryReporter, filters: ECSAPIFeatureFlagFilters, clientName: string, force = false) {
if (this._ecsConfig && !force) return

const requestURL = createECSRequestURL(filters, clientName);
try {
Expand Down

0 comments on commit 669d801

Please sign in to comment.