Linux cannot start the setup script file
Opened this issue · 5 comments
[root@einwin3-api02 wrends]# ./setup --cli
-bash: ./setup: /bin/sh^M: bad interpreter: No such file or directory
Is it possible you have changed line endings in that file by mistake? I have just checked what is included in our build and it has correct line endings in there.
Is it possible you have changed line endings in that file by mistake? I have just checked what is included in our build and it has correct line endings in there.
I use IDEA maven to build in windos, and then upload the built zip package to the Linux server, and then execute the setup file, and the error just appeared. Whether it is a windos build, the configuration of the packaging-related plug-ins needs to be changed to be normal What about running on Linux?
Ok, we might want to add .gitattributes to make sure shell scripts always have LF line endings. I guess cloning repository on Windows will checkout text files with CRLF line endings.
Ok, we might want to add .gitattributes to make sure shell scripts always have LF line endings. I guess cloning repository on Windows will checkout text files with CRLF line endings.
How do I need to set up so that the format of the packaged .sh file can be converted from dos to unix format?
You can quickly fix your issues with dos2unix *.sh
on your Linux machine forcing correct line endings; or disable core.autocrlf
in git config on your Windows machine (and make a fresh clone).
I was checking how Tomcat handles line endings and they are forcing them in their Ant build script. Quite interesting that they went this way instead of using .gitattributes
. I don't want to do in Wren something that is not a common practice so I have to check few other OSS projects for inspiration.