internal/pkg: optional executable files
Test / Create distribution (push) Successful in 56s
Test / Sandbox (push) Successful in 2m54s
Test / ShareFS (push) Successful in 4m2s
Test / Sandbox (race detector) (push) Successful in 5m33s
Test / Hakurei (race detector) (push) Successful in 6m48s
Test / Hakurei (push) Successful in 2m29s
Test / Flake checks (push) Successful in 1m10s

This enables a FileArtifact implementation to specify whether its resulting file should be executable. This change also implements shebang and ELF magic checks in the file artifact.

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
2026-07-23 17:10:22 +09:00
parent 67dbb68818
commit e0eec632d0
10 changed files with 93 additions and 36 deletions
+1 -2
View File
@@ -4,7 +4,6 @@ import (
"bytes"
"io"
"io/fs"
"math"
"reflect"
"testing"
@@ -154,7 +153,7 @@ func TestRevision(t *testing.T) {
p := buf.Bytes()
p[8] = 0xfd
wantErr := pkg.RevisionError{math.MaxUint64 - 2, math.MaxUint64}
wantErr := pkg.RevisionError{0xfd, 0}
if _, err := c.NewDecoder(
bytes.NewReader(p),
).Decode(); !reflect.DeepEqual(err, wantErr) {