Merge pull request #10 from flatcar-linux/dongsu/fix-download-path-vagrant

build_library: set download_path even if its input is empty
This commit is contained in:
Dongsu Park 2019-03-14 21:25:11 +01:00 committed by GitHub
commit b281329f98
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -232,11 +232,9 @@ download_image_url() {
local download_channel
if [[ -n "${FLAGS_download_path}" ]]; then
download_path="${FLAGS_download_path%%/}"
elif [[ "${download_root}" = *flatcar-jenkins* ]]; then
if [[ "${download_path}" == gs://* ]]; then
download_channel="${download_root##*/}"
download_root="gs://${download_channel}.release.flatcar-linux.net"
fi
elif [[ "${download_root}" == *flatcar-jenkins* ]]; then
download_channel="${download_root##*/}"
download_root="gs://${download_channel}.release.flatcar-linux.net"
# Official release download paths don't include the boards directory
download_path="${download_root%%/}/${BOARD}/${FLATCAR_VERSION}"
else