未验证 提交 972096c9 编写于 作者: R Ramya Rao 提交者: GitHub

Skip malicious check when --disable-extensions (#62351)

* Skip malicious check when --disable-extensions

* Refactor as per review comments
上级 723ef612
...@@ -55,6 +55,7 @@ import { Query } from 'vs/workbench/parts/extensions/common/extensionQuery'; ...@@ -55,6 +55,7 @@ import { Query } from 'vs/workbench/parts/extensions/common/extensionQuery';
import { SuggestEnabledInput, attachSuggestEnabledInputBoxStyler } from 'vs/workbench/parts/codeEditor/electron-browser/suggestEnabledInput'; import { SuggestEnabledInput, attachSuggestEnabledInputBoxStyler } from 'vs/workbench/parts/codeEditor/electron-browser/suggestEnabledInput';
import { alert } from 'vs/base/browser/ui/aria/aria'; import { alert } from 'vs/base/browser/ui/aria/aria';
import { createErrorWithActions } from 'vs/base/common/errorsWithActions'; import { createErrorWithActions } from 'vs/base/common/errorsWithActions';
import { IEnvironmentService } from 'vs/platform/environment/common/environment';
interface SearchInputEvent extends Event { interface SearchInputEvent extends Event {
target: HTMLInputElement; target: HTMLInputElement;
...@@ -608,10 +609,13 @@ export class MaliciousExtensionChecker implements IWorkbenchContribution { ...@@ -608,10 +609,13 @@ export class MaliciousExtensionChecker implements IWorkbenchContribution {
@IExtensionManagementService private extensionsManagementService: IExtensionManagementService, @IExtensionManagementService private extensionsManagementService: IExtensionManagementService,
@IWindowService private windowService: IWindowService, @IWindowService private windowService: IWindowService,
@ILogService private logService: ILogService, @ILogService private logService: ILogService,
@INotificationService private notificationService: INotificationService @INotificationService private notificationService: INotificationService,
@IEnvironmentService private environmentService: IEnvironmentService
) { ) {
if (!this.environmentService.disableExtensions) {
this.loopCheckForMaliciousExtensions(); this.loopCheckForMaliciousExtensions();
} }
}
private loopCheckForMaliciousExtensions(): void { private loopCheckForMaliciousExtensions(): void {
this.checkForMaliciousExtensions() this.checkForMaliciousExtensions()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册