error: unable to spawn glslangValidator: FileNotFound
The strange thing is that when running in pws, or cmd directly the exe is found and has no trouble executing. I would expect addSystemCommand could execute exe’s on the PATH env variable but this is not the case?
Initializes a Step.Run with argv, which must at least have the path to the executable.
It is not like a shell that automatically resolves the command name to an executable, instead you have to do that resolution to the actual executable explicitly by using findProgram or something like it.
According to @dimdin resolving a command to an executable should work, if it is available in one of the pathes in the PATH environment variable.
It means that you must provide at least one element in the argv (the path to executable).
I have used addSystemCommand to invoke tools that are on the PATH and it works perfectly every time.
@ricknijhuis ensure that the correct PATH is set, by calling: b.addSystemCommand(&.{"cmd /c \"echo %PATH%\""}; for windows b.addSystemCommand(&.{"sh -c 'echo $PATH'"}; for linux/mac/etc.
EDIT: this is wrong, each command argument must be a separate element. b.addSystemCommand(&.{"cmd", "/c", "echo %PATH%"}; for windows b.addSystemCommand(&.{"sh", "-c", "echo $PATH"}; for linux/mac/etc.