AlexAplin / nndownload

Download and process links from Niconico (nicovideo.jp)
MIT License
223 stars 29 forks source link

Linux issue: Change line endings to LF #115

Closed senneh closed 2 years ago

senneh commented 2 years ago

I get the following error on Linux

$ nndownload.py
/usr/bin/env: ‘python\r’: No such file or directory

This happens because the first line of nndownload.py, #!/usr/bin/env python, has 'CRLF' line endings instead of just 'LF'. The solution would be to convert the entire project to use LF line endings.

Python itself does not care about line endings, but the shebang line does. Everything will still work on Windows while also making Linux users happy.

senneh commented 2 years ago

On further inspection this seems to a problem only with the pip version. When I clone the repo it seems to work just fine.

Either git does conversions on your machine or pip does when you publish your package.

AlexAplin commented 2 years ago

The repo behaves how I'd like, which is commiting with Linux endings and converting on checkout.

Now to the package, I could change it to Linux endings, but won't that equally affect Windows users? I assume just LF is more portable but need to investigate.

AlexAplin commented 2 years ago

LF used in the v1.12 release.