Skip to content

Commit

Permalink
Covered empty file case
Browse files Browse the repository at this point in the history
  • Loading branch information
jackbdoughty committed Oct 25, 2024
1 parent 6724329 commit b450ea2
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions installation_and_upgrade/define_latest_genie_python.bat
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,25 @@ REM Fetch newest python build from \\isis\inst$\Kits$\CompGroup\ICP\genie_python
REM Use genie_python_install to install it into a temporary directory
REM Need to make sure that after every use of this bat that these variables are undefined and the temp dir is removed


set "KITS_ICP_PATH=\\isis.cclrc.ac.uk\inst$\Kits$\CompGroup\ICP"
set "genie_dir=%KITS_ICP_PATH%\genie_python_3"
set "latest_build_file=%genie_dir%\LATEST_BUILD.txt"

if exist "%genie_dir%\LATEST_BUILD.txt" (
set "PYTHON_BUILD_NO="

if exist "%genie_dir%\LATEST_BUILD.txt" (
for /f %%i in ( %genie_dir%\LATEST_BUILD.txt ) do (

set PYTHON_BUILD_NO=%%i

)

) else (

@echo Could not access LATEST_BUILD.txt
goto ERROR

)

if "%PYTHON_BUILD_NO%" == "" (
@echo invalid LATEST_BUILD.txt
goto ERROR
)

if "%~1" NEQ "" (
Expand Down

0 comments on commit b450ea2

Please sign in to comment.