With nbstripout, given a Jupyter notebook with CRLF endings on Windows:
nbstripout ./my_windows_file.ipynb
results in a zero return code but the working file has been updated on disk to have unix-style LF endings.
One fix I found was to remove the newline = '' setting here which seems to corrupt the output. Removing this results in the saved file continuing to have CRLF file endings and the return code is still 0. Removing the explicit newline arg allows Python to save the file with the OS native endings.
With
nbstripout, given a Jupyter notebook with CRLF endings on Windows:results in a zero return code but the working file has been updated on disk to have unix-style LF endings.
One fix I found was to remove the
newline = ''setting here which seems to corrupt the output. Removing this results in the saved file continuing to have CRLF file endings and the return code is still 0. Removing the explicit newline arg allows Python to save the file with the OS native endings.