Commit 8f4f5ba
committed
fix(npm): repair .cmd wrappers for already-installed tools on Windows
EnsureInstalledFromSpecs skips installation when a tool is already
present (e.g. restored from a CI cache). If the cached installation
was created before PostInstall was implemented, the npm .cmd wrappers
still contain the broken relative node.exe path.
Add an idempotent PostInstall repair pass inside the 'already installed'
branch for npm tools on Windows. PostInstall reads and rewrites .cmd
files to use the absolute node.exe path — safe to call repeatedly.
On Linux/macOS PostInstall is a no-op, so there is no performance impact
on those platforms.1 parent 32ce045 commit 8f4f5ba
1 file changed
Lines changed: 15 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
974 | 974 | | |
975 | 975 | | |
976 | 976 | | |
| 977 | + | |
| 978 | + | |
| 979 | + | |
| 980 | + | |
| 981 | + | |
| 982 | + | |
| 983 | + | |
| 984 | + | |
| 985 | + | |
| 986 | + | |
| 987 | + | |
| 988 | + | |
| 989 | + | |
| 990 | + | |
| 991 | + | |
977 | 992 | | |
978 | 993 | | |
979 | 994 | | |
| |||
0 commit comments