| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent e1e059a commit 2893b4c
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -46,6 +46,8 @@ exit /b 1 | |||
| 46 | 46 | ||
| 47 | 47 | :found-python | |
| 48 | 48 | echo Python found in %p%\python.exe | |
| 49 | + call :check-python %p%\python.exe | ||
| 50 | + if errorlevel 1 goto :no-python | ||
| 49 | 51 | endlocal ^ | |
| 50 | 52 | & set "pt=%p%" ^ | |
| 51 | 53 | & set "need_path_ext=%need_path%" | |
@@ -54,6 +56,15 @@ set "pt=" | |||
| 54 | 56 | set "need_path_ext=" | |
| 55 | 57 | exit /b 0 | |
| 56 | 58 | ||
| 59 | + :check-python | ||
| 60 | + %~1 -V | ||
| 61 | + :: 9009 means error file not found | ||
| 62 | + if %errorlevel% equ 9009 ( | ||
| 63 | + echo Not an executable Python program | ||
| 64 | + exit /b 1 | ||
| 65 | + ) | ||
| 66 | + exit /b 0 | ||
| 67 | + | ||
| 57 | 68 | :no-python | |
| 58 | 69 | echo Could not find Python. | |
| 59 | 70 | exit /b 1 | |
| Back | FazBrowse Home | New Git URL |
0 commit comments