Skip to content

Commit

Permalink
Merge pull request #298 from Mashimiao/generate-fix-remove-all-parse
Browse files Browse the repository at this point in the history
generate: fix *-remove-all parse bug
  • Loading branch information
Mrunal Patel committed Jan 10, 2017
2 parents 015f898 + 346850a commit c91307b
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions cmd/oci-runtime-tool/generate.go
Expand Up @@ -260,11 +260,7 @@ func setupSpec(g *generate.Generator, context *cli.Context) error {
}
}

privileged := false
if context.IsSet("privileged") {
privileged = context.Bool("privileged")
}
g.SetupPrivileged(privileged)
g.SetupPrivileged(context.Bool("privileged"))

if context.IsSet("cap-add") {
addCaps := context.StringSlice("cap-add")
Expand Down Expand Up @@ -482,7 +478,7 @@ func setupSpec(g *generate.Generator, context *cli.Context) error {
}
}

if context.IsSet("rlimits-remove-all") {
if context.Bool("rlimits-remove-all") {
g.ClearProcessRlimits()
}

Expand Down Expand Up @@ -680,7 +676,7 @@ func addSeccomp(context *cli.Context, g *generate.Generator) error {
}
}

if context.IsSet("seccomp-remove-all") {
if context.Bool("seccomp-remove-all") {
err := g.RemoveAllSeccompRules()
if err != nil {
return err
Expand Down

0 comments on commit c91307b

Please sign in to comment.