diff options
author | John W. Parent <45471568+johnwparent@users.noreply.github.com> | 2023-02-17 07:01:25 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-17 04:01:25 -0800 |
commit | 573f7bf4cd72fc5ca0be324208f202c551c4dc26 (patch) | |
tree | 934b2b9097a84ed7a25181baa779045f4064abf9 | |
parent | 9f3f4b38e858ee93627fdd82bed33d2edf55e000 (diff) | |
download | spack-573f7bf4cd72fc5ca0be324208f202c551c4dc26.tar.gz spack-573f7bf4cd72fc5ca0be324208f202c551c4dc26.tar.bz2 spack-573f7bf4cd72fc5ca0be324208f202c551c4dc26.tar.xz spack-573f7bf4cd72fc5ca0be324208f202c551c4dc26.zip |
Windows: enforce carriage return for .bat files (#35514)
Batch scripts in general will not function without carriage return line
endings on Windows. We rely on these scripts to support cmd, so we
should not allow these scripts to be converted to lf.
Note: Windows 11 supports lf line endings due to the use of Windows
Terminal. Once support for Windows 10 is dropped, this change can be
reverted.
-rw-r--r-- | .gitattributes | 1 | ||||
-rw-r--r-- | bin/spack.bat | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/.gitattributes b/.gitattributes index 5299044761..6dee4b041c 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,3 +1,4 @@ *.py diff=python *.lp linguist-language=Prolog lib/spack/external/* linguist-vendored +*.bat text eol=crlf
\ No newline at end of file diff --git a/bin/spack.bat b/bin/spack.bat index 073f778c34..310b59506c 100644 --- a/bin/spack.bat +++ b/bin/spack.bat @@ -226,7 +226,7 @@ for %%Z in ("%_pa_new_path%") do if EXIST %%~sZ\NUL ( exit /b 0 :: set module system roots -:_sp_multi_pathadd +:_sp_multi_pathadd for %%I in (%~2) do ( for %%Z in (%_sp_compatible_sys_types%) do ( :pathadd "%~1" "%%I\%%Z" |