aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/pkg/exec.go
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2026-06-10 13:34:44 +0900
committerOphestra <cat@gensokyo.uk>2026-06-10 13:34:44 +0900
commitc661a3b63a6ec6a680338879dccbcb0b6285f6c6 (patch)
tree66f80b5e360de8b38e103df15e85a671200fc6c9 /internal/pkg/exec.go
parentdf0bb877db8daa9e2a24cc76f1890e7ffea414ef (diff)
cmd/mbf: migrate shell to enter
This reduces duplicate code. This change also adds resolv.conf to the container. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/pkg/exec.go')
-rw-r--r--internal/pkg/exec.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/internal/pkg/exec.go b/internal/pkg/exec.go
index 0fe20848..4dd9fc26 100644
--- a/internal/pkg/exec.go
+++ b/internal/pkg/exec.go
@@ -591,6 +591,7 @@ var (
func (c *Cache) EnterExec(
ctx context.Context,
a Artifact,
+ hostname string,
retainSession bool,
stdin io.Reader,
stdout, stderr io.Writer,
@@ -671,6 +672,9 @@ func (c *Cache) EnterExec(
z.Env = append(z.Env, "TERM="+s)
}
}
+ if hostname != "" {
+ z.Hostname = hostname
+ }
if err = z.Start(); err != nil {
return