mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-04-24 22:30:03 +00:00
Fix: Ignore invalid Github Token (#1839)
* Fix: Ignore empty Github Token Empty GitHub Token is invalid, it should not be used. * Fix compilation And detect more invalid tokens Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com> * fix Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com> --------- Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com>
This commit is contained in:
parent
e017be2247
commit
6b4dbb4caa
1 changed files with 4 additions and 0 deletions
|
@ -609,6 +609,10 @@ You cannot use --{option} and specify multiple packages at the same time. Do one
|
|||
opts.github_token = Some(GithubToken(Zeroizing::new(github_token.into())));
|
||||
}
|
||||
}
|
||||
match opts.github_token.as_ref() {
|
||||
Some(token) if token.0.len() < 10 => opts.github_token = None,
|
||||
_ => (),
|
||||
}
|
||||
|
||||
opts
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue