forked from rosa/hakurei
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>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user