Nupkg path in RELEASES file gets updated incorrectly
I noticed something weird when I started producing deltas for releases using the update service as the remoteReleases URI in electron-winstaller. It seems that the update service is returning this for the latest release's RELEASES file now:
9A410F776059D4CEA85D008B461D90C7B95033EB https://github.com/atom/atom-nightly-releases/releases/download/1.29.0-nightly6/https://github.com/atom/atom-nightly-releases/releases/download/1.29.0-nightly5/atom-1.29.0-nightly5-full.nupkg 149089622
B6E8F9C8D6BE42E7888EE35CF90C4C4C10C0DB28 atom-1.29.0-nightly6-delta.nupkg 48698787
B503279BD722E84E74F611AFBF4E3F2DE60F48CD atom-1.29.0-nightly6-full.nupkg 149087747
On the first line, the nupkg path is double-prefixed with a URL path. The original RELEASES file from my repo looks like this:
9A410F776059D4CEA85D008B461D90C7B95033EB https://github.com/atom/atom-nightly-releases/releases/download/1.29.0-nightly5/atom-1.29.0-nightly5-full.nupkg 149089622
B6E8F9C8D6BE42E7888EE35CF90C4C4C10C0DB28 atom-1.29.0-nightly6-delta.nupkg 48698787
B503279BD722E84E74F611AFBF4E3F2DE60F48CD atom-1.29.0-nightly6-full.nupkg 149087747
This could be the consequence of using a different repository for delivering releases, perhaps Squirrel is doing something sneaky there?
I copied our RELEASES prefixing code from https://github.com/zeit/hazel/blob/master/lib/cache.js#L45-L55, hoping that since hazel has had good use it would be correct.
You can also see tests for this current logic here and here.
For the reference, this are the original RELEASE files' contents, before the update server modifies it:
Nightly5:
9A410F776059D4CEA85D008B461D90C7B95033EB atom-1.29.0-nightly5-full.nupkg 149089622
Nightly6:
9A410F776059D4CEA85D008B461D90C7B95033EB https://github.com/atom/atom-nightly-releases/releases/download/1.29.0-nightly5/atom-1.29.0-nightly5-full.nupkg 149089622
...
@davej how does that URL make it into your Nightly6 RELEASE file?
@juliangruber: wrong Dave you've mentioned 🙂
oops @daviwil
It seems this issue is exactly related to https://github.com/electron/electron/issues/24149