Skip to content

Commit dec2b9e

Browse files
committed
feat: set the built-in extensions path into extensionDetails
- Moved the code to get the built-in extensions path from `logDebugInfo` in to the `setExtensionData` method. - Added the built-in extensions path to the `extensionDetails` Map in `setExtensionData` method. - Updated `logDebugInfo` method to get the `builtInExtensionsPath` key from the Map using `getExtensionData` method.
1 parent 50ef691 commit dec2b9e

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/configuration.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,12 +232,14 @@ export class Configuration {
232232
const version = extensionPackageJsonData.version;
233233

234234
const userExtensionsPath = path.join(vscode.extensions.getExtension(id).extensionPath, "../");
235+
const builtInExtensionsPath = path.join(vscode.env.appRoot, "extensions");
235236

236237
this.extensionDetails.set("id", id);
237238
this.extensionDetails.set("name", name);
238239
this.extensionDetails.set("displayName", displayName);
239240
this.extensionDetails.set("version", version);
240241
this.extensionDetails.set("userExtensionsPath", userExtensionsPath);
242+
this.extensionDetails.set("builtInExtensionsPath", builtInExtensionsPath);
241243
}
242244

243245
/**
@@ -1109,7 +1111,7 @@ export class Configuration {
11091111
private logDebugInfo() {
11101112
// The path to the built-in extensions. The env variable changes when on WSL.
11111113
// So we can use it for both Windows and WSL.
1112-
const builtInExtensionsPath = path.join(vscode.env.appRoot, "extensions");
1114+
const builtInExtensionsPath = this.getExtensionData("builtInExtensionsPath");
11131115

11141116
let extensionsPaths = {};
11151117

0 commit comments

Comments
 (0)