Commit 0a5b939
committed
Simplify & fix node interception approach
Previously we injected into $PATH directly so that we could take
complete control. With NODE_OPTIONS this isn't actually necessary, since
the only option we care about can be set just from env vars directly.
This would've been more difficult to set up back when this was written,
since it was only included in node 8, but it's been backported to 6.12
and node 6 and 8 are both EOL now, so I think we can handle that.
This notably also fixes interception issues with anything that respawns
node using process.execPath (i.e. Yarn) which previously skipped the
hooks setup. Using these env vars instead lets us punch right through
that.1 parent 28ddd7b commit 0a5b939
File tree
4 files changed
+6
-40
lines changed- overrides
- js
- path
- src/interceptors/terminal
4 files changed
+6
-40
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| |||
69 | 70 | | |
70 | 71 | | |
71 | 72 | | |
72 | | - | |
73 | | - | |
74 | | - | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
75 | 77 | | |
76 | 78 | | |
0 commit comments