@vscode/policy-watcher 1.2.0 (#243132)

* mac policy support (code changes)

* adopt @vscode/policy-watcher 1.2.0
This commit is contained in:
Josh Spicer
2025-03-11 02:51:51 +01:00
committed by GitHub
parent 393f929eff
commit 56440fa442
4 changed files with 16 additions and 8 deletions
+10 -3
View File
@@ -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