Skip to content

Commit

Permalink
fix: properly detect node everywhere
Browse files Browse the repository at this point in the history
  • Loading branch information
Loïc Mangeonjean committed Jul 10, 2024
1 parent 04c5b41 commit 33e754c
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions vscode-paches/0056-fix-properly-detect-node-everywhere.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Lo=C3=AFc=20Mangeonjean?= <[email protected]>
Date: Wed, 10 Jul 2024 15:15:02 +0200
Subject: [PATCH] fix: properly detect node everywhere

---
src/vs/base/common/process.ts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/vs/base/common/process.ts b/src/vs/base/common/process.ts
index 48fcd8acb43..981e5924af3 100644
--- a/src/vs/base/common/process.ts
+++ b/src/vs/base/common/process.ts
@@ -21,7 +21,7 @@ if (typeof vscodeGlobal !== 'undefined' && typeof vscodeGlobal.process !== 'unde
}

// Native node.js environment
-else if (typeof process !== 'undefined') {
+else if (typeof process !== 'undefined' && typeof process?.versions?.node === 'string') {
safeProcess = {
get platform() { return process.platform; },
get arch() { return process.arch; },

1 comment on commit 33e754c

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.