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
1 changed files with 1 additions and 1 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue