diff --git a/pkg/fission-cli/cmd/environment/create.go b/pkg/fission-cli/cmd/environment/create.go index e45d537e..2c35153f 100644 --- a/pkg/fission-cli/cmd/environment/create.go +++ b/pkg/fission-cli/cmd/environment/create.go @@ -132,8 +132,7 @@ func createEnvironmentFromCmd(input cli.Input) (*fv1.Environment, error) { pullSecret := input.String(flagkey.EnvImagePullSecret) envVersion := input.Int(flagkey.EnvVersion) - // Environment API interface version is not specified and - // builder image is empty, set default interface version + if envVersion == 0 { envVersion = 1 } diff --git a/pkg/fission-cli/cmd/environment/update.go b/pkg/fission-cli/cmd/environment/update.go index 5c1bbb6c..c95a60af 100644 --- a/pkg/fission-cli/cmd/environment/update.go +++ b/pkg/fission-cli/cmd/environment/update.go @@ -97,9 +97,6 @@ func (opts *UpdateSubCommand) run(input cli.Input) error { if err != nil { return errors.Wrap(err, "error updating environment") } - if err != nil { - return errors.Wrap(err, "error updating environment") - } fmt.Printf("environment '%v' updated\n", enew.ObjectMeta.Name) return nil