Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/microsoft/vscode.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Pasero <benjpas@microsoft.com>2020-11-25 11:59:49 +0300
committerBenjamin Pasero <benjpas@microsoft.com>2020-11-25 11:59:55 +0300
commit96b2c670d7e484ab860fa9dde8e042b4ad83687b (patch)
treeca1a358a36da69ed21fe0af8e1ffbc8e90ffdec3 /src/vs/workbench/contrib/extensions/electron-sandbox
parentffec932655b672f1b11f6db1696c9460d1f92eb3 (diff)
debt - extensions path is always defined
Diffstat (limited to 'src/vs/workbench/contrib/extensions/electron-sandbox')
-rw-r--r--src/vs/workbench/contrib/extensions/electron-sandbox/extensionsActions.ts26
1 files changed, 12 insertions, 14 deletions
diff --git a/src/vs/workbench/contrib/extensions/electron-sandbox/extensionsActions.ts b/src/vs/workbench/contrib/extensions/electron-sandbox/extensionsActions.ts
index 369d6a1bf0b..99cd8d052d8 100644
--- a/src/vs/workbench/contrib/extensions/electron-sandbox/extensionsActions.ts
+++ b/src/vs/workbench/contrib/extensions/electron-sandbox/extensionsActions.ts
@@ -27,20 +27,18 @@ export class OpenExtensionsFolderAction extends Action {
}
async run(): Promise<void> {
- if (this.environmentService.extensionsPath) {
- const extensionsHome = URI.file(this.environmentService.extensionsPath);
- const file = await this.fileService.resolve(extensionsHome);
-
- let itemToShow: URI;
- if (file.children && file.children.length > 0) {
- itemToShow = file.children[0].resource;
- } else {
- itemToShow = extensionsHome;
- }
-
- if (itemToShow.scheme === Schemas.file) {
- return this.nativeHostService.showItemInFolder(itemToShow.fsPath);
- }
+ const extensionsHome = URI.file(this.environmentService.extensionsPath);
+ const file = await this.fileService.resolve(extensionsHome);
+
+ let itemToShow: URI;
+ if (file.children && file.children.length > 0) {
+ itemToShow = file.children[0].resource;
+ } else {
+ itemToShow = extensionsHome;
+ }
+
+ if (itemToShow.scheme === Schemas.file) {
+ return this.nativeHostService.showItemInFolder(itemToShow.fsPath);
}
}
}