mirror of
https://github.com/microsoft/vscode.git
synced 2026-09-30 15:04:28 +01:00
@vscode/policy-watcher 1.2.0 (#243132)
* mac policy support (code changes) * adopt @vscode/policy-watcher 1.2.0
This commit is contained in:
@@ -198,9 +198,16 @@ class CodeMain {
|
||||
fileService.registerProvider(Schemas.vscodeUserData, new FileUserDataProvider(Schemas.file, diskFileSystemProvider, Schemas.vscodeUserData, userDataProfilesMainService, uriIdentityService, logService));
|
||||
|
||||
// Policy
|
||||
const policyService = isWindows && productService.win32RegValueName ? disposables.add(new NativePolicyService(logService, productService.win32RegValueName))
|
||||
: environmentMainService.policyFile ? disposables.add(new FilePolicyService(environmentMainService.policyFile, fileService, logService))
|
||||
: new NullPolicyService();
|
||||
let policyService: IPolicyService | undefined;
|
||||
if (isWindows && productService.win32RegValueName) {
|
||||
policyService = disposables.add(new NativePolicyService(logService, productService.win32RegValueName));
|
||||
} else if (isMacintosh && productService.darwinBundleIdentifier) {
|
||||
policyService = disposables.add(new NativePolicyService(logService, productService.darwinBundleIdentifier));
|
||||
} else if (environmentMainService.policyFile) {
|
||||
policyService = disposables.add(new FilePolicyService(environmentMainService.policyFile, fileService, logService));
|
||||
} else {
|
||||
policyService = new NullPolicyService();
|
||||
}
|
||||
services.set(IPolicyService, policyService);
|
||||
|
||||
// Configuration
|
||||
|
||||
Reference in New Issue
Block a user