Skip to content

Commit

Permalink
roblox/bootstrapper: print manif url, fix check manif len
Browse files Browse the repository at this point in the history
  • Loading branch information
apprehensions committed Nov 3, 2023
1 parent 078156c commit fb8ee52
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions roblox/bootstrapper/manifest.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,22 @@ func FetchManifest(ver *version.Version) (Manifest, error) {
return Manifest{}, err
}
durl := cdn + channelPath(ver.Channel) + ver.GUID
url := durl + "-rbxPkgManifest.txt"

log.Printf("Fetching manifest for %s (%s)", ver.GUID, durl)
log.Printf("Fetching manifest for %s (%s)", ver.GUID, url)

manif, err := util.Body(durl + "-rbxPkgManifest.txt")
smanif, err := util.Body(url)
if err != nil {
return Manifest{}, fmt.Errorf("fetch %s manifest: %w", ver.GUID, err)
}

pkgs, err := ParsePackages(strings.Split(manif, "\r\n"))
// Because the manifest ends with also a newline, it has to be removed.
manif := strings.Split(smanif, "\r\n")
if len(manif) > 0 && manif[len(manif)-1] == "" {
manif = manif[:len(manif)-1]
}

pkgs, err := ParsePackages(manif)
if err != nil {
return Manifest{}, err
}
Expand Down

0 comments on commit fb8ee52

Please sign in to comment.