Follow the channel server's redirect and offer the stable releases
channels.nixos.org answers <branch>/git-revision with a redirect, which router-upgrade check did not follow: on a real router it saw an empty answer. The test channel is now an HTTP server that redirects the same way. The page labelled the running release "stable", but nixos-unstable already calls itself the next release (26.11 does not exist as a branch yet). It offers none, unstable and the stable releases listed in the code (26.05). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AeFqV9dZrK6nipHkPfyM4F
This commit is contained in:
@@ -84,7 +84,8 @@ let
|
||||
|
||||
newest_rev() {
|
||||
local rev
|
||||
rev=$(curl -fsS --max-time 30 "${up.channelsUrl}/$branch/git-revision") \
|
||||
# (channels.nixos.org answers with a redirect to releases.nixos.org.)
|
||||
rev=$(curl -fsSL --max-time 30 "${up.channelsUrl}/$branch/git-revision") \
|
||||
|| die "cannot read ${up.channelsUrl}/$branch/git-revision (no internet, or no channel of that name)"
|
||||
[[ $rev =~ ^[0-9a-f]{40}$ ]] || die "unexpected answer for $branch: ''${rev:0:60}"
|
||||
echo "$rev"
|
||||
|
||||
Reference in New Issue
Block a user