From 14907d075267cd57ca32b012138c8f30c6cd8345 Mon Sep 17 00:00:00 2001 From: Wei Liu Date: Wed, 8 Nov 2023 06:36:23 +0000 Subject: [PATCH] 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 --- scripts/test-util.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/test-util.sh b/scripts/test-util.sh index 1dbaae7c0..fa744d1f3 100644 --- a/scripts/test-util.sh +++ b/scripts/test-util.sh @@ -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" \