Commit 0a56753
authored
fix: get correct URL for
* fix: get correct URL for `lua-language-server` release artifact on Windows
Currently, `lua-language-server` installs are done by getting the URLs
to release artifacts by matching the release API response to a hardcoded
string consisting of `platform-architecture.<ARCHIVE_FORMAT>`, with the
`ARCHIVE_FORMAT` itself being hardcoded to always be `.tar.gz`.
Currently, `lua-language-server` releases archives for Windows within a
`.zip` archive instead of `.tar.gz`, which causes the logic to fail on
Windows and send over a `nil` instead to the download function.
Instead of fixing it by updating the hardcoded values, this opts to make
it more dynamic and try to figure out what symbol to send over to the
decompression argument from the downloaded archive's filename, as well
as to only use the platform string to determine which link to find and
follow to download the LSP from, sans archive format suffix.
This SHOULD hold better moving forward, barring any strange issues where
e.g. the release has checksums listed at the top with the
`platform-architecture` string embedded in the filename, but this isn't
guaranteed to be stable forever moving forward unless there's some
consensus around HOW to find artifacts for a particular configuration in
a stable manner.
* don't modify match data
This only cares about whether or not it matches and won't do anything
with the resulting match data.
* condense parentheseslua-language-server release artifact on Windows (#5006)1 parent 8465450 commit 0a56753
1 file changed
Lines changed: 34 additions & 28 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
553 | 553 | | |
554 | 554 | | |
555 | 555 | | |
556 | | - | |
557 | | - | |
558 | | - | |
559 | | - | |
560 | | - | |
561 | | - | |
562 | | - | |
563 | | - | |
564 | | - | |
565 | | - | |
566 | | - | |
567 | | - | |
568 | | - | |
569 | | - | |
570 | | - | |
571 | | - | |
572 | | - | |
573 | | - | |
574 | | - | |
575 | | - | |
576 | | - | |
577 | | - | |
578 | | - | |
579 | | - | |
580 | | - | |
581 | | - | |
582 | | - | |
583 | | - | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
584 | 590 | | |
585 | 591 | | |
586 | 592 | | |
| |||
0 commit comments