From 87d08d1ac2f3d562bc137e7d43d842b528224bd4 Mon Sep 17 00:00:00 2001 From: Mrunal Patel Date: Fri, 6 Jan 2017 16:02:05 -0800 Subject: [PATCH] Simplify loop to a simple array append Signed-off-by: Mrunal Patel --- exec.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/exec.go b/exec.go index 4f37d24de67..544d3de4c9a 100644 --- a/exec.go +++ b/exec.go @@ -178,9 +178,8 @@ func getProcess(context *cli.Context, bundle string) (*specs.Process, error) { p.Capabilities = caps } // append the passed env variables - for _, e := range context.StringSlice("env") { - p.Env = append(p.Env, e) - } + p.Env = append(p.Env, context.StringSlice("env")...) + // set the tty if context.IsSet("tty") { p.Terminal = context.Bool("tty")