diff options
| author | Ophestra <cat@gensokyo.uk> | 2026-06-10 13:34:44 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2026-06-10 13:34:44 +0900 |
| commit | c661a3b63a6ec6a680338879dccbcb0b6285f6c6 (patch) | |
| tree | 66f80b5e360de8b38e103df15e85a671200fc6c9 /internal/pkg/exec.go | |
| parent | df0bb877db8daa9e2a24cc76f1890e7ffea414ef (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.go | 4 |
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 |
