Skip to content

Commit

Permalink
Simplify loop to a simple array append
Browse files Browse the repository at this point in the history
Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
  • Loading branch information
mrunalp committed Jan 7, 2017
1 parent 84a3bd2 commit 87d08d1
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions exec.go
Expand Up @@ -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")
Expand Down

0 comments on commit 87d08d1

Please sign in to comment.