mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-12-22 05:35:20 +00:00
scripts: fix the check for GitHub authentication token
When the script is invoked via dev_cli.sh, it always gets AUTH_DOWNLOAD_TOKEN from the environment. The original test always returns true. Signed-off-by: Wei Liu <liuwe@microsoft.com>
This commit is contained in:
parent
aad5cd7858
commit
14907d0752
@ -109,7 +109,7 @@ process_common_args() {
|
||||
}
|
||||
|
||||
download_hypervisor_fw() {
|
||||
if [ -v AUTH_DOWNLOAD_TOKEN ]; then
|
||||
if [ -n "$AUTH_DOWNLOAD_TOKEN" ]; then
|
||||
echo "Using authenticated download from GitHub"
|
||||
FW_URL=$(curl --silent https://api.github.com/repos/cloud-hypervisor/rust-hypervisor-firmware/releases/latest \
|
||||
--header "Authorization: Token $AUTH_DOWNLOAD_TOKEN" \
|
||||
|
Loading…
Reference in New Issue
Block a user