Part of my CI/CD routine on Gitlab is calling a Batch script, which then calls a Python script. For some reason, the runner fails to interact with Python each time. I've produced an example script for simplicity's sake, here are the contents:
call python3 --version
call C:\Users\*******\AppData\Local\Microsoft\WindowsApps\python3 --version
where the second line is just providing the full path to Python's executable. If I run this script manually via the command line, it works as intended. If, however, it is called via Gitlab's runner, this is the output:
So it appears that the runner does not have access to PATH (which is weird given the fact that it has no problem using other executables whose directories are listed in it) and fails to execute Python once the path has been given. I have ensured the runner is installed as a service and isn't being interfered with by Windows Defender in any way. What could be the cause of this issue?