-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: properly detect node everywhere
- 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.
There are no files selected for viewing
22 changes: 22 additions & 0 deletions
22
vscode-paches/0056-fix-properly-detect-node-everywhere.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; }, |
33e754c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉 Published on https://monaco-vscode-api.netlify.app as production
🚀 Deployed on https://668e909a59f3ab09c0dc6cd5--monaco-vscode-api.netlify.app