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
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:
@@ -91,6 +91,9 @@ func (c compoundCloser) Close() error {
|
||||
return err
|
||||
}
|
||||
|
||||
// IsExecutable returns false.
|
||||
func (*decompressArtifact) IsExecutable() bool { return false }
|
||||
|
||||
// Cure returns a decompressor [io.ReadCloser].
|
||||
func (a *decompressArtifact) Cure(r *RContext) (io.ReadCloser, error) {
|
||||
sr, err := r.Open(a.f)
|
||||
|
||||
Reference in New Issue
Block a user