aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/pkg/net.go
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2026-07-23 17:10:22 +0900
committerOphestra <cat@gensokyo.uk>2026-07-23 17:10:22 +0900
commite0eec632d0a7cca2fb09e026997fa9a39dcd7504 (patch)
tree705ecc285e4fe05c3bba126a276c2e9e28ae9ec8 /internal/pkg/net.go
parent67dbb68818026f3d7a64e9519cf1aac36468b7c9 (diff)
internal/pkg: optional executable files
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>
Diffstat (limited to 'internal/pkg/net.go')
-rw-r--r--internal/pkg/net.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/internal/pkg/net.go b/internal/pkg/net.go
index 412dd2a7..cd30e3bb 100644
--- a/internal/pkg/net.go
+++ b/internal/pkg/net.go
@@ -74,6 +74,9 @@ func (e ResponseStatusError) Error() string {
return "the requested URL returned non-OK status: " + http.StatusText(int(e))
}
+// IsExecutable returns false.
+func (*httpArtifact) IsExecutable() bool { return false }
+
// Cure sends the http request and returns the resulting response body reader
// wrapped to perform checksum validation. It is valid but not encouraged to
// close the resulting [io.ReadCloser] before it is read to EOF, as that causes