Change flag name to KeepArchive for backward compatibility (#787)

This commit is contained in:
Ta-Ching Chen
2018-07-06 03:13:07 +08:00
committed by GitHub
parent 5b6582698c
commit 61569d1c38
8 changed files with 34 additions and 33 deletions
+6 -5
View File
@@ -93,10 +93,7 @@ func envCreate(c *cli.Context) error {
}
}
extractArchive := true
if c.IsSet("extract") {
extractArchive = c.Bool("extract")
}
keepArchive := c.Bool("keeparchive")
// Environment API interface version is not specified and
// builder image is empty, set default interface version
@@ -124,7 +121,7 @@ func envCreate(c *cli.Context) error {
Resources: resourceReq,
AllowAccessToExternalNetwork: envExternalNetwork,
TerminationGracePeriod: envGracePeriod,
ExtractArchive: extractArchive,
KeepArchive: keepArchive,
},
}
@@ -214,6 +211,10 @@ func envUpdate(c *cli.Context) error {
env.Spec.TerminationGracePeriod = c.Int64("period")
}
if c.IsSet("keeparchive") {
env.Spec.KeepArchive = c.Bool("keeparchive")
}
env.Spec.AllowAccessToExternalNetwork = envExternalNetwork
_, err = client.EnvironmentUpdate(env)