Skip to content

Commit e6107c8

Browse files
committed
tools: enable no-empty ESLint rule
nodejs/node#41831
1 parent d689e87 commit e6107c8

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

patches/node/chore_allow_the_node_entrypoint_to_be_a_builtin_module.patch

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,23 +11,25 @@ diff --git a/lib/internal/bootstrap/pre_execution.js b/lib/internal/bootstrap/pr
1111
index 69da327588799cde0421596ce4c6225890cc297b..522a97cf299d4df21132f0f9ef9a3f0f607d0bd9 100644
1212
--- a/lib/internal/bootstrap/pre_execution.js
1313
+++ b/lib/internal/bootstrap/pre_execution.js
14-
@@ -95,10 +95,12 @@ function patchProcessObject(expandArgv1) {
14+
@@ -95,11 +95,13 @@ function patchProcessObject(expandArgv1) {
1515
if (expandArgv1 && process.argv[1] &&
1616
!StringPrototypeStartsWith(process.argv[1], '-')) {
1717
// Expand process.argv[1] into a full path.
1818
- const path = require('path');
1919
- try {
2020
- process.argv[1] = path.resolve(process.argv[1]);
21-
- } catch {}
21+
- } catch {
22+
- // Continue regardless of error.
2223
+ if (!process.argv[1] || !process.argv[1].startsWith('electron/js2c')) {
2324
+ const path = require('path');
2425
+ try {
2526
+ process.argv[1] = path.resolve(process.argv[1]);
26-
+ } catch {}
27-
+ }
27+
+ } catch {
28+
+ // Continue regardless of error.
29+
+ }
30+
}
2831
}
2932

30-
// TODO(joyeecheung): most of these should be deprecated and removed,
3133
diff --git a/lib/internal/modules/cjs/loader.js b/lib/internal/modules/cjs/loader.js
3234
index 6f06043e6636b48e924cab63f510c805a8ade9b8..1d1fb975ff0bfca6c40d0a95adf2617dff94f18c 100644
3335
--- a/lib/internal/modules/cjs/loader.js

0 commit comments

Comments
 (0)