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.
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 with0
(success), which means the hook doesn't work with--dry-run
.IMO,
--dry-run
should return non-0 (ideally1
) if any file would be changed by runningnbstripout
.