From e1d9425cba50bf48a51af4e655aa1a1ebdbd73b0 Mon Sep 17 00:00:00 2001 From: Jiahao XU <30436523+NobodyXu@users.noreply.github.com> Date: Fri, 26 Jul 2024 18:02:31 +1000 Subject: [PATCH] Fix: Ignore empty Github Token Empty GitHub Token is invalid, it should not be used. --- crates/bin/src/args.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/crates/bin/src/args.rs b/crates/bin/src/args.rs index 8fbe09e5..d8ea4e96 100644 --- a/crates/bin/src/args.rs +++ b/crates/bin/src/args.rs @@ -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_deref() { + Some(token) if token.is_empty() => opts.github_token = None, + _ => (), + } opts }