Fix: support comparison of int types in dry-run

This avoids printing a change when the before and after values are the
same.
This commit is contained in:
justinsb 2024-01-28 16:12:09 -05:00
parent a55614910d
commit 2b9c46bb83
1 changed files with 3 additions and 0 deletions

View File

@ -328,6 +328,9 @@ func buildChangeList[T SubContext](a, e, changes Task[T]) ([]change, error) {
case reflect.String:
changed = fieldValC.Convert(reflect.TypeOf("")).Interface() != ""
case reflect.Int:
changed = fieldValA.Int() != fieldValE.Int()
}
if !changed {
continue