- extractTarZst uses Windows' System32 tar.exe (reads .tar.zst and D:\ paths); a bare "tar" could resolve to GNU tar, whose failure left the zstd | tar pipe deadlocked. The fallback now decompresses to a temp file. - pack-runtime.ps1 casts raw_bytes to an integer (PowerShell 7 summed to a double, "962466926.0", which the Go reader rejected); the reader now also accepts whole-number floats. - `runtime fetch latest --candidate` honours flags after the positional arg. - Docs: release layout, source package contents and the open MSYS2 source question (portable-runtime-spec.md §4, §7); roadmap M1.2 and M2.1 progress. Verified: a fresh `reims-go runtime fetch latest --candidate` downloads the published runtime-3731afd from GitHub, checks SHA256SUMS.txt, unpacks and activates it (75 s for 169 MB); reims-ctl and QEMU run from the result. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
20 lines
549 B
Go
20 lines
549 B
Go
package runtime
|
|
|
|
import (
|
|
"os"
|
|
"path/filepath"
|
|
"testing"
|
|
)
|
|
|
|
func TestManifestAcceptsWholeNumberFloats(t *testing.T) {
|
|
p := filepath.Join(t.TempDir(), "manifest.json")
|
|
os.WriteFile(p, []byte("\ufeff"+`{"schema_version":2,"commit":"3731afd","raw_bytes":962466926.0,"patches":[{"name":"a.patch","target":"vendor/qemu","sha256":"ab"}],"channel":"candidate"}`), 0o644)
|
|
m, err := readManifest(p)
|
|
if err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
if m.RawBytes != 962466926 || m.Channel != "candidate" || len(m.Patches) != 1 {
|
|
t.Fatalf("manifest = %+v", m)
|
|
}
|
|
}
|