summaryrefslogtreecommitdiff
path: root/.gitattributes
diff options
context:
space:
mode:
authorHrishikesh Kadam <hrkadam.92@gmail.com>2022-07-20 01:57:49 +0530
committerGitHub <noreply@github.com>2022-07-19 21:27:49 +0100
commit4aeef8e224e68e64d3f58838bba3a393cb52eea0 (patch)
treeb0b0d945853be982301d87021237a0124e99af1e /.gitattributes
parentdd167ff0ee90fa47e0d92c514c20f1aaa53363bc (diff)
downloadnode-new-4aeef8e224e68e64d3f58838bba3a393cb52eea0.tar.gz
build: add .gitattributes for npm and other shims
This issue has been described in - https://github.com/nodejs/node/issues/43860 On Windows system, git clone or git checkout on the repo turns LF line endings to CRLF in the worktree. This can happen due to many reasons like - - git config --system core.autocrlf (set to true) - git config --global core.autocrlf (set to true) - git config --local core.autocrlf (set to true) - git clone --config core.autocrlf=true ... Adding gitattributes for the shims will not convert them to CRLF line endings. Also, there is a note[1] in test/README.md which says - For the tests to run on Windows, be sure to clone Node.js source code with the `autocrlf` git config flag set to true. Reason for using build subsystem - These shims are just copied in stage_package label of vcbuild.bat Fixes: https://github.com/nodejs/node/issues/43860 [1]: https://github.com/nodejs/node/commit/3654cd4cdaf2ab84d0e6a190c3b9e89e86726a88 PR-URL: https://github.com/nodejs/node/pull/43879 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Diffstat (limited to '.gitattributes')
-rw-r--r--.gitattributes3
1 files changed, 3 insertions, 0 deletions
diff --git a/.gitattributes b/.gitattributes
index 9f7d9377ea..82563e5d2f 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -1,3 +1,6 @@
test/fixtures/* -text
vcbuild.bat text eol=crlf
+deps/npm/bin/npm text eol=lf
+deps/npm/bin/npx text eol=lf
+deps/corepack/shims/corepack text eol=lf
tools/msvs/find_python.cmd text eol=crlf