summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorJohn Parent <john.parent@kitware.com>2021-10-22 14:00:02 -0400
committerPeter Scheibel <scheibel1@llnl.gov>2022-03-17 09:01:01 -0700
commit3a994032f8143a2bdbfe5c61baeb12b1bd2fed60 (patch)
tree6d4e357f96f071bb50c62cb7238bb85f0431c6b7 /bin
parent90c773488c59e57c19ecca5635c1ae7f70e56076 (diff)
downloadspack-3a994032f8143a2bdbfe5c61baeb12b1bd2fed60.tar.gz
spack-3a994032f8143a2bdbfe5c61baeb12b1bd2fed60.tar.bz2
spack-3a994032f8143a2bdbfe5c61baeb12b1bd2fed60.tar.xz
spack-3a994032f8143a2bdbfe5c61baeb12b1bd2fed60.zip
Spack on Windows package ports
CMake - Windows Bootstrap (#25825) Remove hardcoded cmake compiler (#26410) Revert breaking cmake changes Ensure no autotools on Windows Perl on Windows (#26612) Python source build windows (#26313) Reconfigure sysconf for Windows Python2.6 compatibility Fxixup new sbang tests for windows Ruby support (#28287) Add NASM support (#28319) Add mock Ninja package for testing
Diffstat (limited to 'bin')
-rw-r--r--bin/spack_cmd.bat8
1 files changed, 6 insertions, 2 deletions
diff --git a/bin/spack_cmd.bat b/bin/spack_cmd.bat
index 5ba685fa46..56b6024665 100644
--- a/bin/spack_cmd.bat
+++ b/bin/spack_cmd.bat
@@ -15,8 +15,12 @@ popd
:: Check if Python is on the PATH
if not defined python_pf_ver (
-(for /f "delims=" %%F in ('where python.exe') do (set python_pf_ver=%%F) ) 2> NUL
+(for /f "delims=" %%F in ('where python.exe') do (
+ set python_pf_ver=%%F
+ goto :found_python
+ ) ) 2> NUL
)
+:found_python
if not defined python_pf_ver (
:: If not, look for Python from the Spack installer
:get_builtin
@@ -35,7 +39,7 @@ if not defined python_pf_ver (
:: Python is already on the path
set py_exe=!python_pf_ver!
(for /F "tokens=* USEBACKQ" %%F in (
- `!py_exe! --version`) do (set "output=%%F")) 2>NUL
+ `"!py_exe!" --version`) do (set "output=%%F")) 2>NUL
if not "!output:Microsoft Store=!"=="!output!" goto :get_builtin
goto :exitpoint
)