From 916b87c649c5a89b03c8ec379592e86cf5fff3e8 Mon Sep 17 00:00:00 2001 From: Jiahao XU <30436523+NobodyXu@users.noreply.github.com> Date: Fri, 26 Jul 2024 18:12:35 +1000 Subject: [PATCH] Fix compilation And detect more invalid tokens Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com> --- crates/bin/src/args.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/bin/src/args.rs b/crates/bin/src/args.rs index d8ea4e96..5d62b52e 100644 --- a/crates/bin/src/args.rs +++ b/crates/bin/src/args.rs @@ -609,8 +609,8 @@ 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_deref() { - Some(token) if token.is_empty() => opts.github_token = None, + match opts.github_token.as_ref() { + Some(token) if token.len() < 10 => opts.github_token = None, _ => (), }