aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--internal/pkg/exec.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/internal/pkg/exec.go b/internal/pkg/exec.go
index a78dab84..6b6964fd 100644
--- a/internal/pkg/exec.go
+++ b/internal/pkg/exec.go
@@ -579,6 +579,11 @@ func (c *Cache) EnterExec(
z.Stdin, z.Stdout, z.Stderr = stdin, stdout, stderr
z.Path, z.Args = path, args
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 {
return