Skip to content

Commit

Permalink
tools: enable no-empty ESLint rule
Browse files Browse the repository at this point in the history
  • Loading branch information
codebytere committed Mar 17, 2022
1 parent 178d603 commit 9bc11d9
Showing 1 changed file with 7 additions and 5 deletions.
Expand Up @@ -11,23 +11,25 @@ diff --git a/lib/internal/bootstrap/pre_execution.js b/lib/internal/bootstrap/pr
index 69da327588799cde0421596ce4c6225890cc297b..522a97cf299d4df21132f0f9ef9a3f0f607d0bd9 100644
--- a/lib/internal/bootstrap/pre_execution.js
+++ b/lib/internal/bootstrap/pre_execution.js
@@ -95,10 +95,12 @@ function patchProcessObject(expandArgv1) {
@@ -95,11 +95,13 @@ function patchProcessObject(expandArgv1) {
if (expandArgv1 && process.argv[1] &&
!StringPrototypeStartsWith(process.argv[1], '-')) {
// Expand process.argv[1] into a full path.
- const path = require('path');
- try {
- process.argv[1] = path.resolve(process.argv[1]);
- } catch {}
- } catch {
- // Continue regardless of error.
+ if (!process.argv[1] || !process.argv[1].startsWith('electron/js2c')) {
+ const path = require('path');
+ try {
+ process.argv[1] = path.resolve(process.argv[1]);
+ } catch {}
+ }
+ } catch {
+ // Continue regardless of error.
+ }
}
}

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

0 comments on commit 9bc11d9

Please sign in to comment.