Skip to content

Add docs to avoid issues with CRLF line endings #869

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

Merged
merged 3 commits into from
Jun 28, 2022

Conversation

jsoriano
Copy link
Member

@jsoriano jsoriano commented Jun 27, 2022

When developing on Windows you may face issues because of CRLF line endings:

  • If core.autocrlf=true is enabled in git (common in Windows), files included in binaries with embed may include CRLF line endings, causing issues when used in docker scenarios.
  • If it is disabled, with core.autocrlf=false (usual default), file editors in Windows may add CRLF line endings in files.

With core.autocrlf=input git doesn't include CRLF when checking out files, and it removes the carriage return when commiting files, avoiding the unexpected presence of CRLF line endings.

For example, this issue was found when running the Kibana healthcheck with an elastic-package binary built on Windows:

$ bash -x healthcheck.sh
+ $'\r'
healthcheck.sh: line 2: $'\r': command not found
+ set $'-e\r'
: invalid optionline 3: set: -
...

@jsoriano jsoriano requested review from ManojS-shetty and a team June 27, 2022 17:49
@jsoriano jsoriano self-assigned this Jun 27, 2022
@elasticmachine
Copy link
Collaborator

elasticmachine commented Jun 27, 2022

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Start Time: 2022-06-27T17:57:58.465+0000

  • Duration: 33 min 4 sec

Test stats 🧪

Test Results
Failed 0
Passed 742
Skipped 0
Total 742

🤖 GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

@elasticmachine
Copy link
Collaborator

🌐 Coverage report

Name Metrics % (covered/total) Diff
Packages 100.0% (31/31) 💚
Files 66.071% (74/112) 👍
Classes 61.146% (96/157) 👍
Methods 49.126% (309/629) 👍
Lines 33.068% (2784/8419) 👍
Conditionals 100.0% (0/0) 💚

@jsoriano jsoriano mentioned this pull request Jun 27, 2022
24 tasks
Copy link

@ManojS-shetty ManojS-shetty left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@jsoriano jsoriano merged commit 591b444 into elastic:main Jun 28, 2022
@jsoriano jsoriano deleted the docs-git-clone-windows branch June 28, 2022 10:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants