josephburnett / jd

JSON diff and patch
MIT License
826 stars 38 forks source link

Return code is always 1 in version 1.7.0 #54

Closed dreedarm closed 1 year ago

dreedarm commented 1 year ago

With version 1.7.0 I'm finding that the return code is always being set to 1 even if the files match.

10:48 $ jd --version
jd version 1.7.0
10:48 $ jd --set expected_output.json expected_output.json
10:49 $ echo $?
1

With previous version this would return 0 and 1 only when the input files differed.

josephburnett commented 1 year ago

Whoops! Sorry about that. When I added support for using jd as a git diff driver, I accidentally dropped a line: https://github.com/josephburnett/jd/commit/c79c2ec5b3bd3491f2a0168640ac6b850ba906fe

I've fixed this bug and added main tests to make sure it never happens again: https://github.com/josephburnett/jd/commit/b5d115ce58b246ab63782c290386972a3bd28b95

The latest release 1.7.1 has this bug fix: https://github.com/josephburnett/jd/releases/tag/v1.7.1