Fix: Ignore empty Github Token

Empty GitHub Token is invalid, it should not be used.
This commit is contained in:
Jiahao XU 2024-07-26 18:02:31 +10:00 committed by GitHub
parent e017be2247
commit e1d9425cba
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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
}