summaryrefslogtreecommitdiff
path: root/bin/spack.bat
AgeCommit message (Collapse)AuthorFilesLines
2023-09-08Spack on Windows: fix shell scripts when root contains a space (#39875)John W. Parent1-1/+1
Enclose variable tracking root in quotes.
2023-08-18spack.bat: Fixup CL arg parsing (#39359)John W. Parent1-51/+29
Previous changes to this file stopped directly processing CL args to stop batch `for` from interpolating batch reserved characters needed in arguments like URLS. In doing so, we relied on `for` for an easy "split" operation, however this incorrectly splits paths with spaces in certain cases. Processing everything ourselves with manual looping via `goto` statements allows for full control over CL parsing and handling of both paths with spaces and reserved characters.
2023-06-27Windows: Add PowerShell env support (#37951)John W. Parent1-1/+1
PowerShell requires explicit shell and env support in Spack. This is due to the distinct differences in shell interactions between cmd and pwsh. Add a doskey in pwsh piping 'spack' commands to a powershell script similar to the sh function 'spack'. Add support for PowerShell-specific shell interactions from Spack (set/unset shell variables).
2023-04-06Spack on Windows: spack.bat comment syntax (#36531)John W. Parent1-19/+19
Comments must start with `rem` in most cases.
2023-03-28Windows: spack.bat CLI handling robustness (#36281)John W. Parent1-36/+71
* Current develop spack.bat file cannot handle any reserved characters being passed via the CLI, particularly '=' and '?'. To address this, re-do the CLI parsing for loop to use custom logic to allow for more granular handling of CLI args. * We take a less-than-ideal approach to escaping local scope and handling unset variables as well as the actual parsing of CL arguments. To address this, don't quote the args and then try to parse the quotes we just added (resulting in spack flags being undefined). Instead, leverage batch script features. Since we are not unnecessarily quoting things, we don't need to think about removing them, and in the case of paths with spaces, we should _not_ be removing the quotes as we currently do.
2023-02-17Windows: enforce carriage return for .bat files (#35514)John W. Parent1-1/+1
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.
2023-02-07Windows: Fix spack.bat handling of env commands (#35143)Dan Lipsa1-18/+30
This PR enables the successful execution of the spack binary cache tutorial on Windows. It assumes gnupg and file are available (they can be installed with choco). * Fix handling of args with quotes in spack.bat * `file` utility can be installed on Windows (e.g. with choco): update error message accordingly
2023-01-18license year bump (#34921)Harmen Stoppels1-1/+1
* license bump year * fix black issues of modified files * mypy * fix 2021 -> 2023
2022-03-17Add Github Actions for Windows (#24504)John Parent1-2/+2
Setup Installer CI (#25184), (#25191) Co-authored-by: Zack Galbreath <zack.galbreath@kitware.com> Co-authored-by: lou.lawrence@kitware.com <lou.lawrence@kitware.com> Co-authored-by: Betsy McPhail <betsy.mcphail@kitware.com>
2022-03-17Relocate spack_cmd and scripts from installer to root bin (#24651)John W. Parent1-0/+223
Relocate spack_cmd and scripts from installer to root bin Refactor documentation, installer, and launcher to facilitate that change