Commit 2c98690
authored
fix: convert Windows paths to POSIX format for MSYS2 GPG on Windows
The Git-bundled GPG on Windows (C:\Program Files\Git\usr\bin\gpg.exe) is
an MSYS2-based binary that uses POSIX path conventions internally. When
Windows-style paths with backslashes and drive letters (D:\a\_temp\...)
are passed as arguments, GPG may fail to resolve them correctly, resulting
in a fatal error (exit code 2).
Fix: add a toGpgPath() helper that converts Windows paths to MSYS2 POSIX
format (/d/a/_temp/...) before passing them to any gpg command. On Linux
and macOS the helper is a no-op.
Applied to all four paths used in verifyPackageSignature:
- gpgHome (--homedir argument)
- publicKeyFile (--import argument)
- signaturePath (--verify signature argument)
- archivePath (--verify data argument)1 parent 8012407 commit 2c98690
4 files changed
Lines changed: 111 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
35 | 64 | | |
36 | 65 | | |
37 | 66 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52313 | 52313 | | |
52314 | 52314 | | |
52315 | 52315 | | |
52316 | | - | |
| 52316 | + | |
52317 | 52317 | | |
52318 | 52318 | | |
52319 | 52319 | | |
| |||
52322 | 52322 | | |
52323 | 52323 | | |
52324 | 52324 | | |
| 52325 | + | |
| 52326 | + | |
| 52327 | + | |
| 52328 | + | |
| 52329 | + | |
| 52330 | + | |
| 52331 | + | |
| 52332 | + | |
| 52333 | + | |
| 52334 | + | |
| 52335 | + | |
| 52336 | + | |
52325 | 52337 | | |
52326 | 52338 | | |
52327 | 52339 | | |
| |||
52378 | 52390 | | |
52379 | 52391 | | |
52380 | 52392 | | |
52381 | | - | |
52382 | | - | |
| 52393 | + | |
| 52394 | + | |
| 52395 | + | |
| 52396 | + | |
| 52397 | + | |
| 52398 | + | |
| 52399 | + | |
| 52400 | + | |
| 52401 | + | |
| 52402 | + | |
| 52403 | + | |
| 52404 | + | |
| 52405 | + | |
| 52406 | + | |
| 52407 | + | |
52383 | 52408 | | |
52384 | 52409 | | |
52385 | 52410 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
81093 | 81093 | | |
81094 | 81094 | | |
81095 | 81095 | | |
81096 | | - | |
| 81096 | + | |
81097 | 81097 | | |
81098 | 81098 | | |
81099 | 81099 | | |
| |||
81102 | 81102 | | |
81103 | 81103 | | |
81104 | 81104 | | |
| 81105 | + | |
| 81106 | + | |
| 81107 | + | |
| 81108 | + | |
| 81109 | + | |
| 81110 | + | |
| 81111 | + | |
| 81112 | + | |
| 81113 | + | |
| 81114 | + | |
| 81115 | + | |
| 81116 | + | |
81105 | 81117 | | |
81106 | 81118 | | |
81107 | 81119 | | |
| |||
81158 | 81170 | | |
81159 | 81171 | | |
81160 | 81172 | | |
81161 | | - | |
81162 | | - | |
| 81173 | + | |
| 81174 | + | |
| 81175 | + | |
| 81176 | + | |
| 81177 | + | |
| 81178 | + | |
| 81179 | + | |
| 81180 | + | |
| 81181 | + | |
| 81182 | + | |
| 81183 | + | |
| 81184 | + | |
| 81185 | + | |
| 81186 | + | |
| 81187 | + | |
81163 | 81188 | | |
81164 | 81189 | | |
81165 | 81190 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
13 | 24 | | |
14 | 25 | | |
15 | 26 | | |
| |||
84 | 95 | | |
85 | 96 | | |
86 | 97 | | |
87 | | - | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
88 | 105 | | |
89 | 106 | | |
90 | 107 | | |
91 | 108 | | |
92 | | - | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
93 | 117 | | |
94 | 118 | | |
95 | 119 | | |
| |||
0 commit comments