Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

提一个我认为是 Bug,顺带给出解决方案(有可能作者不一定认为) #10

Closed
judasn opened this issue Nov 29, 2018 · 2 comments
Labels
enhancement New feature or request

Comments

@judasn
Copy link

judasn commented Nov 29, 2018

遇到问题场景

  • 在 CentOS 7.4 执行 startup.sh,发现报:line 2: $'\r': command not found
  • 很明显,在 sh 文件上采用 CRLF

继续排查

  • Clone 了代码,查看了所有 sh 后缀的脚本
  • IntelliJ IDEA 显示所有 sh 后缀的脚本都是 CRLF

个人想法

  • 我个人对 Linux 的理解是:所有 sh 脚本应该都是 LF 的,但是不知道作者是怎样考虑的。

解决办法

  • 如果作者用 IntelliJ IDEA 开发,如下图操作即可,然后提交代码。

image.png

感谢

  • 最近有在看该工具,作者用心了,至少代码和文档看着不会让人感觉很变扭
  • IntelliJ IDEA 打开,轻松 build、install 没有任何报错
@lulu2panpan
Copy link
Contributor

ok,这个问题我们跟进一下

@elevenqq
Copy link
Contributor

sh脚本格式已经由CRLF改为LF

@lulu2panpan lulu2panpan added the enhancement New feature or request label Jan 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants