Skip to content
This repository has been archived by the owner on Jan 28, 2019. It is now read-only.

Commit

Permalink
return early when comparing Null values
Browse files Browse the repository at this point in the history
  • Loading branch information
jbardin committed Nov 27, 2018
1 parent 6f4d860 commit 78256ae
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions plans/objchange/compatible.go
Original file line number Diff line number Diff line change
Expand Up @@ -197,9 +197,11 @@ func assertValueCompatible(planned, actual cty.Value, path cty.Path) []error {
return nil
}
errs = append(errs, path.NewErrorf("was %#v, but now null", planned))
return errs
}
if planned.IsNull() {
errs = append(errs, path.NewErrorf("was null, but now %#v", actual))
return errs
}

ty := planned.Type()
Expand Down

0 comments on commit 78256ae

Please sign in to comment.