internal/pkg: pick up $TERM if attaching stdin
All checks were successful
Test / Create distribution (push) Successful in 1m16s
Test / Sandbox (push) Successful in 3m11s
Test / Hakurei (push) Successful in 4m29s
Test / ShareFS (push) Successful in 4m31s
Test / Sandbox (race detector) (push) Successful in 5m42s
Test / Hakurei (race detector) (push) Successful in 6m57s
Test / Flake checks (push) Successful in 1m26s
All checks were successful
Test / Create distribution (push) Successful in 1m16s
Test / Sandbox (push) Successful in 3m11s
Test / Hakurei (push) Successful in 4m29s
Test / ShareFS (push) Successful in 4m31s
Test / Sandbox (race detector) (push) Successful in 5m42s
Test / Hakurei (race detector) (push) Successful in 6m57s
Test / Flake checks (push) Successful in 1m26s
This improves behaviour of some programs. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
@@ -579,6 +579,11 @@ func (c *Cache) EnterExec(
|
|||||||
z.Stdin, z.Stdout, z.Stderr = stdin, stdout, stderr
|
z.Stdin, z.Stdout, z.Stderr = stdin, stdout, stderr
|
||||||
z.Path, z.Args = path, args
|
z.Path, z.Args = path, args
|
||||||
z.RetainSession = retainSession
|
z.RetainSession = retainSession
|
||||||
|
if stdin == os.Stdin {
|
||||||
|
if s, ok := os.LookupEnv("TERM"); ok {
|
||||||
|
z.Env = append(z.Env, "TERM="+s)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if err = z.Start(); err != nil {
|
if err = z.Start(); err != nil {
|
||||||
return
|
return
|
||||||
|
|||||||
Reference in New Issue
Block a user