Added a flag to control the extraction of archive based on user input (#675)
For certain environments, the archive should not be extracted and kept as it is (For ex. for Java the jar file should not be extracted). This change enables an environment level flag to control this behaviour.
This commit is contained in:
@@ -93,6 +93,11 @@ func envCreate(c *cli.Context) error {
|
||||
}
|
||||
}
|
||||
|
||||
extractArchive := true
|
||||
if c.IsSet("extract") {
|
||||
extractArchive = c.Bool("extract")
|
||||
}
|
||||
|
||||
// Environment API interface version is not specified and
|
||||
// builder image is empty, set default interface version
|
||||
if envVersion == 0 {
|
||||
@@ -119,6 +124,7 @@ func envCreate(c *cli.Context) error {
|
||||
Resources: resourceReq,
|
||||
AllowAccessToExternalNetwork: envExternalNetwork,
|
||||
TerminationGracePeriod: envGracePeriod,
|
||||
ExtractArchive: extractArchive,
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user