Commit graph

20 commits

Author SHA1 Message Date
Félix Saparelli
6333fb0bd3
Use newer format! syntax 2022-06-08 16:39:34 +12:00
Jiahao XU
b2a533dbdb
Optimize GhCrateMeta::check: Avoid converting url to str
Only to convert it back to `Url` in `helpers::remote_exists`

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-06-07 15:40:55 +10:00
Félix Saparelli
7ce1ac4ee6
Fix syntax 2022-06-01 01:11:26 +12:00
Félix Saparelli
f2905dd46e
Update src/helpers.rs
Co-authored-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-06-01 01:11:26 +12:00
Félix Saparelli
ac74da4a27
Clippy suggestions 2022-06-01 01:11:26 +12:00
Félix Saparelli
1cac046ffd
Formatting 2022-06-01 00:29:17 +12:00
Félix Saparelli
dee45f4b81
Correct HTTP error for remote_exists() helper 2022-06-01 00:29:17 +12:00
Félix Saparelli
c83c184983
Default to no if nothing is entered on confirm 2022-06-01 00:29:17 +12:00
Félix Saparelli
52c0213d98
Show prompt for confirm 2022-06-01 00:29:17 +12:00
Félix Saparelli
02c8c0af00
Avoid bare url 2022-06-01 00:29:17 +12:00
Félix Saparelli
c0eaffb05d
Refactor for rich errors, split user abort and genuine error 2022-06-01 00:29:14 +12:00
Jiahao XU
5b6634def6
Add new variant PkgFmt::Tzstd and update helpers::extract
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-05-31 16:50:55 +10:00
Félix Saparelli
b5d6d68d6d Fix quickinstall failing when packages are not wrapped in a folder 2022-02-16 22:42:37 +13:00
Félix Saparelli
370ae05620
QuickInstall support (#94)
See this issue: https://github.com/alsuren/cargo-quickinstall/issues/27

Quick Install is a hosted repo of built crates, essentially. The approach I've taken here is
a list of strategies:

1. First, we check the crate meta or default and build the URL to the repo. Once we have
   that, we perform a `HEAD` request to the URL to see if it's available.
2. If it's not, we build the URL to the quickinstall repo, and perform a `HEAD` to there.

As soon as we've got a hit, we use that. I've built it so it's extensible with more strategies.
This could be useful for #4.

This also adds a prompt before downloading from third-party sources, and logs a short
name for a source, which is easier to glance than a full URL, and includes a quick refactor
of the install/link machinery.
2022-02-16 14:49:07 +13:00
ryan kurte
7aaba5e1ee improve debug logging on extraction 2021-10-08 12:16:14 +13:00
ryan
1c25b1346f added zip support, pkg-fmt override
swapped CI to build zips for windows
2021-04-08 18:39:54 +12:00
Félix Saparelli
9c06ca94cb
Add support for Txz archives 2021-03-06 22:35:05 +13:00
ryan
5fd78341c8 cleaning up binary logic, using standard [[bin]] definitions now 2020-12-31 13:19:58 +13:00
ryan
8777c355c5 swapped to symlink-based installation 2020-12-30 17:34:07 +13:00
ryan
8f7f7f5530 refactoring to library 2020-12-30 15:27:39 +13:00