mirror of
https://github.com/opencontainers/runc.git
synced 2026-02-05 09:46:08 +01:00
Simplify loop to a simple array append
Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
This commit is contained in:
5
exec.go
5
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")
|
||||
|
||||
Reference in New Issue
Block a user