diff --git a/encoding/openapi/build.go b/encoding/openapi/build.go index bc52f110f..01c07a03c 100644 --- a/encoding/openapi/build.go +++ b/encoding/openapi/build.go @@ -489,7 +489,7 @@ func (b *builder) disjunction(a []cue.Value, f typeFunc) { for _, v := range a { switch { - case v.Null() == nil: + case v.IsNull(): // TODO: for JSON schema, we need to fall through. nullable = true diff --git a/pkg/tool/exec/exec.go b/pkg/tool/exec/exec.go index e8a0d743f..db6197e66 100644 --- a/pkg/tool/exec/exec.go +++ b/pkg/tool/exec/exec.go @@ -46,7 +46,7 @@ func (c *execCmd) Run(ctx *task.Context) (res interface{}, err error) { // TODO: set environment variables, if defined. stream := func(name string) (stream cue.Value, ok bool) { c := ctx.Obj.LookupPath(cue.ParsePath(name)) - if err := c.Null(); c.Err() != nil || err == nil { + if c.Err() != nil || c.IsNull() { return } return c, true