Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: correctly read user's product.json #2057

Merged
merged 1 commit into from
Oct 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions patches/merge-user-product.patch
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
diff --git a/src/main.js b/src/main.js
index 10bd503..4048782 100644
index 10bd503..4d55178 100644
--- a/src/main.js
+++ b/src/main.js
@@ -132,2 +132,14 @@ registerListeners();
@@ -42,2 +42,6 @@ import { resolveNLSConfiguration } from './vs/base/node/nls.js';
import { getUNCHost, addUNCHostToAllowlist } from './vs/base/node/unc.js';
+import { createRequire } from 'node:module'
+
+/** @ts-ignore */
+const require = createRequire(import.meta.url)

@@ -132,2 +136,14 @@ registerListeners();

+function resolveUserProduct() {
+ const userDataPath = getUserDataPath({}, product.nameShort ?? 'code-oss-dev');
Expand All @@ -17,7 +24,7 @@ index 10bd503..4048782 100644
+}
+
/**
@@ -208,2 +220,3 @@ function startup(codeCachePath, nlsConfig) {
@@ -208,2 +224,3 @@ function startup(codeCachePath, nlsConfig) {
process.env['VSCODE_CODE_CACHE_PATH'] = codeCachePath || '';
+ resolveUserProduct();

Expand Down
Loading