diff --git a/.gitignore b/.gitignore index c338e141c8d..4306e9589e8 100644 --- a/.gitignore +++ b/.gitignore @@ -16,3 +16,4 @@ vscode.lsif vscode.db /.profile-oss /cli/target +product.overrides.json diff --git a/product.overrides.json b/product.overrides.json deleted file mode 100644 index 0967ef424bc..00000000000 --- a/product.overrides.json +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/src/bootstrap-amd.js b/src/bootstrap-amd.js index f8cb1dbdac9..a96b5096773 100644 --- a/src/bootstrap-amd.js +++ b/src/bootstrap-amd.js @@ -19,7 +19,7 @@ globalThis._VSCODE_NODE_MODULES = new Proxy(Object.create(null), { get: (_target let product = require('../product.json'); if (process.env['VSCODE_DEV']) { // Patch product overrides when running out of sources - product = Object.assign(product, require('../product.overrides.json')); + try { product = Object.assign(product, require(require('path').join(__dirname, '../product.overrides.json'))); } catch (error) { /* ignore */ } } globalThis._VSCODE_PRODUCT_JSON = product; globalThis._VSCODE_PACKAGE_JSON = require('../package.json'); diff --git a/src/bootstrap-window.js b/src/bootstrap-window.js index e2009358f5c..7f48fdb4898 100644 --- a/src/bootstrap-window.js +++ b/src/bootstrap-window.js @@ -120,7 +120,7 @@ let product = (require.__$__nodeRequire ?? require)(configuration.appRoot + '/product.json'); if (process.env['VSCODE_DEV']) { // Patch product overrides when running out of sources - product = Object.assign(product, (require.__$__nodeRequire ?? require)(configuration.appRoot + '/product.overrides.json')); + try { product = Object.assign(product, (require.__$__nodeRequire ?? require)(configuration.appRoot + '/product.overrides.json')); } catch (error) { /* ignore */ } } globalThis._VSCODE_PRODUCT_JSON = product; globalThis._VSCODE_PACKAGE_JSON = (require.__$__nodeRequire ?? require)(configuration.appRoot + '/package.json');