cargo-binstall/crates/bin/src
Jiahao XU 8a08cdda6f
Fix GitHub token auto discovery (#1335)
* Fix GitHub token auto discovery

Fixed #1333

 - Rm dep `gh-token` since it is broken and we can simply run
   `gh auth token` in `cargo-binstall` instead.
 - binstalk-downloader: Make sure GitHub token is at least 40B long
   and other than the `_`, composes of only alphanumeric characters.
 - Warn on failure to read `git/credential` files
 - Optimize `try_from_home` to avoid heap allocation of `PathBuf`

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>

* Fix typo and clippy

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>

* Simplify `is_valid_gh_token` & `is_ascii_alphanumeric` impl

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>

* Improve err msg in `get_inner`

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>

* Improve err msg of `cargo_binstall::gh_token::get`

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>

---------

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-09-01 01:14:59 +00:00
..
args.rs Fix GitHub token auto discovery (#1335) 2023-09-01 01:14:59 +00:00
bin_util.rs Refactor to reduce compilation time (#1284) 2023-08-12 14:25:41 +00:00
entry.rs Fix GitHub token auto discovery (#1335) 2023-09-01 01:14:59 +00:00
gh_token.rs Fix GitHub token auto discovery (#1335) 2023-09-01 01:14:59 +00:00
git_credentials.rs Fix GitHub token auto discovery (#1335) 2023-09-01 01:14:59 +00:00
install_path.rs Support --registry and more options from .cargo/config.toml (#1195) 2023-07-10 03:37:41 +00:00
lib.rs Fix GitHub token auto discovery (#1335) 2023-09-01 01:14:59 +00:00
logging.rs Refactor: Extract new crate binstalk-bins (#1294) 2023-08-15 21:48:42 +00:00
main.rs Refactor cargo-binstall (#1302) 2023-08-18 01:59:48 +00:00
main_impl.rs Refactor cargo-binstall (#1302) 2023-08-18 01:59:48 +00:00
signal.rs Refactor to reduce compilation time (#1284) 2023-08-12 14:25:41 +00:00
ui.rs Fix panic in ui::confirm on I/O error (#576) 2022-11-29 05:53:45 +00:00