Conversation
修复因为上游api获取到多个deb地址导致下载失败的问题
There was a problem hiding this comment.
Pull request overview
This PR fixes a bug where downloading Debian kernel packages fails when the upstream GitHub API returns multiple deb file URLs. The fix adds | head -n 1 to the pipeline that extracts the image URL, ensuring only the first matching URL is used for the download.
Key Changes:
- Modified the
imgurlextraction command in the x86_64 Debian kernel installation section to limit results to a single URL
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| @@ -560,7 +560,7 @@ installbbr() { | |||
| kernel_version=$github_ver | |||
| detele_kernel_head | |||
| headurl=$(curl -s 'https://api.github.com/repos/ylx2016/kernel/releases' | grep "${github_tag}" | grep 'deb' | grep 'headers' | awk -F '"' '{print $4}') | |||
There was a problem hiding this comment.
The same issue that was fixed for imgurl on line 563 could also affect headurl. If the API returns multiple header deb files matching the search criteria, this line could also retrieve multiple URLs causing download failures. Consider adding | head -n 1 to ensure only a single URL is captured, consistent with the fix applied to imgurl.
修复因为上游api获取到多个deb地址导致下载失败的问题