1/8/2024 0 Comments Git windows line endings![]() ![]() ![]() So I ended up having scripts that ran on the Docker Linux image with Windows' line ending(meaning that at the end of every line the \r\n special characters are appended), and since the line endings on Linux are LF(appending only \n at the end of every line) the scripts would fail. Since I never changed the default configuration of git, it would try to automatically convert any files to CRLF line ending. gitattributes file? Let’s tackle the root of the problem. gitattributes □Īfter consulting with a colleague, he suggested that I take a look at. But alas, it started complaining for another script! So, what should I do in this case? Is it viable to just change the line endings for all the files in my machine manually? And would that solve the problem for the rest of team? Enter. I manually changed the script that was CRLF to LF and behold - the installation stopped complaining about line endings. The machine that I was working was Windows while the Docker image was a Linux distribution so I thought that maybe after all it was a line endings problem. This seemed too suspicious so eventually I decided to investigate further. ![]() After quite a number of tries I noticed that during the installation process some scripts would complain and display an error that \r\n is not recognized as a command. As I am quite a forgetful person, I thought that most probably I forgot to do something from the instructions. Despite all my efforts of setting up the server, I failed over and over again and of course I immediately blamed myself. Lately, I needed to install Docker in order to setup a server locally on my machine for testing purposes. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |