rpm-software-management / spec-cleaner

spec-cleaner
BSD 3-Clause "New" or "Revised" License
28 stars 34 forks source link

Does it do dos2unix cleaning? #260

Closed guoyunhe closed 4 years ago

guoyunhe commented 4 years ago

Original issue here https://github.com/openSUSE/osc/issues/647

I sometimes copied some build commands from GitHub or websites. The copied text may contains \r and some editors don't convert it (vim). When I run osc build, it will throw an error at \r position.

scarabeusiv commented 4 years ago

well technically spec-cleaner converts it because it reads all the content and then just adds its own endlines. But feel free to test it if I am not mistaken.

guoyunhe commented 4 years ago

My test shows different:

echo -e "\r" >> my-package.spec
spec-cleaner my-package.spec
vi my-package.spec

image

guoyunhe commented 4 years ago

Oops, forgot to add -i option. Then it works. The ending \r or ^M has been removed.