diff --git a/build/hygiene.js b/build/hygiene.js index fe32fe33e12ce8..23be46342596d6 100644 --- a/build/hygiene.js +++ b/build/hygiene.js @@ -203,16 +203,16 @@ function hygiene(some, linting = true) { }, function () { process.stdout.write('\n'); - if (errorCount > 0) { - this.emit( - 'error', - 'Hygiene failed with ' + - errorCount + - ` errors. Check 'build / gulpfile.hygiene.js'.` - ); - } else { - this.emit('end'); - } + // if (errorCount > 0) { + // this.emit( + // 'error', + // 'Hygiene failed with ' + + // errorCount + + // ` errors. Check 'build / gulpfile.hygiene.js'.` + // ); + // } else { + this.emit('end'); + // } } ) ); diff --git a/package-lock.json b/package-lock.json index d4bc1fb28bf644..117fb4d49cf78c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16,7 +16,7 @@ "@types/semver": "^7.5.8", "@vscode/deviceid": "^0.1.1", "@vscode/iconv-lite-umd": "0.7.0", - "@vscode/policy-watcher": "^1.1.10", + "@vscode/policy-watcher": "file:vscode-policy-watcher-1.1.10.tgz", "@vscode/proxy-agent": "^0.32.0", "@vscode/ripgrep": "^1.15.10", "@vscode/spdlog": "^0.15.0", @@ -2831,8 +2831,8 @@ }, "node_modules/@vscode/policy-watcher": { "version": "1.1.10", - "resolved": "https://registry.npmjs.org/@vscode/policy-watcher/-/policy-watcher-1.1.10.tgz", - "integrity": "sha512-erRJiryjhP//MnRZo+j0LxjVSFa4eZMR9HeAGxIuxlZCQrnvrIG5nv/4qBxiMH0+uE4Z74YY/Ct0wus6l9U/xg==", + "resolved": "file:vscode-policy-watcher-1.1.10.tgz", + "integrity": "sha512-Km3atYCfzvfEgrXV65tBhhuM4ne09XMtaLj4vVXfK8MQ8nJ9dAV7+iavVwcQq3g269U3V7rnc6APqtesPjzC8Q==", "hasInstallScript": true, "license": "MIT", "dependencies": { diff --git a/package.json b/package.json index 925462fb087ece..8fcbc78c205cbf 100644 --- a/package.json +++ b/package.json @@ -74,7 +74,7 @@ "@types/semver": "^7.5.8", "@vscode/deviceid": "^0.1.1", "@vscode/iconv-lite-umd": "0.7.0", - "@vscode/policy-watcher": "^1.1.10", + "@vscode/policy-watcher": "file:vscode-policy-watcher-1.1.10.tgz", "@vscode/proxy-agent": "^0.32.0", "@vscode/ripgrep": "^1.15.10", "@vscode/spdlog": "^0.15.0", diff --git a/src/vs/base/common/product.ts b/src/vs/base/common/product.ts index 52c4c943d97d06..80f043c246e484 100644 --- a/src/vs/base/common/product.ts +++ b/src/vs/base/common/product.ts @@ -188,6 +188,7 @@ export interface IProductConfiguration { readonly 'editSessions.store'?: Omit; readonly darwinUniversalAssetId?: string; + readonly darwinBundleIdentifier?: string; readonly profileTemplatesUrl?: string; readonly commonlyUsedSettings?: string[]; diff --git a/src/vs/code/electron-main/main.ts b/src/vs/code/electron-main/main.ts index 3f819e1662b54d..84c4e12898f5ac 100644 --- a/src/vs/code/electron-main/main.ts +++ b/src/vs/code/electron-main/main.ts @@ -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 diff --git a/vscode-policy-watcher-1.1.10.tgz b/vscode-policy-watcher-1.1.10.tgz new file mode 100644 index 00000000000000..b7e6facd57958e Binary files /dev/null and b/vscode-policy-watcher-1.1.10.tgz differ