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

Issue with executing shell script /bin/sh^M on Unix/Linux #3370

Closed
Veryfirefly opened this issue Jul 18, 2020 · 2 comments · Fixed by #3371
Closed

Issue with executing shell script /bin/sh^M on Unix/Linux #3370

Veryfirefly opened this issue Jul 18, 2020 · 2 comments · Fixed by #3371
Labels
kind/enhancement Category issues or prs related to enhancement. os/windows
Milestone

Comments

@Veryfirefly
Copy link
Contributor

Issue Description

Type: Bug Report

Describe what happened (or what feature you want)

  1. After nacos is packaged, the /bin/sh^M problem will appear when executing the shell script on Linux. This is caused by script line breaks instead of LF. I checked the script in the source code and found that startup.sh and shutdown.sh are CRLF formatted line breaks
  2. ERROR OS=Windows and the assembly descriptor contains a *nix-specific root-relative-reference. This error occurs during binary packaging in Maven, but it will not affect the packaging. I queried the documentation and found that the reason is: because the assembly task is executed on Windows, but it contains a path relative to Linux.

Describe what you expected to happen

I submitted a PR and revised the above two questions

  1. Format startup.sh and shutdown.sh. Use Unix/Linux standard line break LF to avoid converting line breaks during execution, and tested on Linux and Unix.
  2. Solve the OS=Windows error when packaging Maven. Successfully packaged on Linux and Windows

Tell us your environment

  1. JDK 1.8
  2. CentOS 6.9
@Veryfirefly
Copy link
Contributor Author

#3371

@KomachiSion
Copy link
Collaborator

I have comment in your PR. Please check.

KomachiSion pushed a commit that referenced this issue Jul 20, 2020
…ux (#3371)

* Replace RuntimeException caused by HealthCheckerFactory with Nacos serialization exception

* 1. Format startup.sh and shutdown.sh. Use Unix/Linux standard newline LF
2. Solve the OS = Windows error when packaging Maven (does not affect packaging)
@KomachiSion KomachiSion added kind/enhancement Category issues or prs related to enhancement. os/windows and removed status/need feedback labels Jul 20, 2020
@KomachiSion KomachiSion added this to the 1.3.2 milestone Jul 20, 2020
@KomachiSion KomachiSion mentioned this issue Aug 4, 2020
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement Category issues or prs related to enhancement. os/windows
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants