Repository navigation
Commit 8ca01c3
authored
fix(npmRegistryUtils): env vars names in integrity check fail error message (#854)
When signature verification fails in fetchLatestStableVersion, the
error tells users they can disable the check by setting
COREPACK_INTEGRITY_CHECK=0 or fall back to the bundled latest release
by setting COREPACK_USE_LATEST=0. Neither of those variables exists
anywhere else in the codebase. The runtime actually reads
COREPACK_INTEGRITY_KEYS (in shouldSkipIntegrityCheck) and
COREPACK_DEFAULT_TO_LATEST (in corepackUtils.ts and Engine.ts), and
both are the names documented in the README.
So a user who hits the error and follows the suggestion sets two
variables that have no effect, then keeps hitting the same wall.
This patch rewords the error to name the variables the runtime
actually checks. Behaviour of fetchLatestStableVersion is otherwise
unchanged.
Tests cover both axes: the failing path now mentions the real names
and no longer mentions the phantom ones; and the happy path that
sets COREPACK_INTEGRITY_KEYS=0 still skips verification and returns
the resolved version (regression guard for the env-var name we now
advertise).
Fixes: #849
Signed-off-by: Yarchik <spoko.dev@gmail.com>1 parent b81e92c commit 8ca01c3
2 files changed
Lines changed: 57 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
86 | | - | |
| 86 | + | |
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | | - | |
| 1 | + | |
| 2 | + | |
| 3 | + | |
4 | 4 | | |
5 | | - | |
6 | | - | |
| 5 | + | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
0 commit comments