kynan / nbstripout

strip output from Jupyter and IPython notebooks
Other
1.19k stars 94 forks source link

`--dry-run` should exit non-0 if files would be updated #159

Closed joaonc closed 2 years ago

joaonc commented 2 years ago

Using nbstripout as a pre-commit hook with the --dry-run option so the verification fails with a list of files that need to be updated without actually updating the files. But --dry-run always exits with 0 (success), which means the hook doesn't work with --dry-run.

IMO, --dry-run should return non-0 (ideally 1) if any file would be changed by running nbstripout.

joaonc commented 2 years ago

Oh, this is a dup of https://github.com/kynan/nbstripout/issues/153

Closing.