Skip to content

Commit

Permalink
fix: capture the returned environment from Extend() in env variable
Browse files Browse the repository at this point in the history
Signed-off-by: Chandan-DK <[email protected]>
  • Loading branch information
Chandan-DK committed Sep 13, 2024
1 parent b576129 commit f5d4972
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions pkg/utils/cel/cel.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ func NewCompiler(
matchConditions []admissionregistrationv1.MatchCondition,
variables []admissionregistrationv1beta1.Variable,
) (*Compiler, error) {
env := environment.MustBaseEnvSet(environment.DefaultCompatibilityVersion(), false)
env.Extend(environment.VersionedOptions{
env, err := environment.MustBaseEnvSet(environment.DefaultCompatibilityVersion(), false).Extend(environment.VersionedOptions{

Check failure on line 30 in pkg/utils/cel/cel.go

View workflow job for this annotation

GitHub Actions / tests

ineffectual assignment to err (ineffassign)

Check failure on line 30 in pkg/utils/cel/cel.go

View workflow job for this annotation

GitHub Actions / tests

ineffectual assignment to err (ineffassign)
IntroducedVersion: version.MajorMinor(1, 0),
EnvOptions: []celgo.EnvOption{
library.JsonParseLib(),
Expand Down

0 comments on commit f5d4972

Please sign in to comment.