OS is windows. I am running gradle from cygwin installed in windows. sqlplus is an exe file and it is in path.
I use gradle’s project.exec with
executable = C:/cygwin/bin/sh.exe
args = sample.sh
where sample.sh script tries to connect to db using command sqlplus.
Interestingly if I use ant.exec inside gradle, the script it works fine. The problem is only with gradle’s project.exec where the script raises error sqlplus command not found
Question: Are you running Gradle under the same OS user as sqlplus on the command line?
Question: Can you verify that putting println(System.getenv(“PATH”)) into a build script prints the path to sqlplus? Anwer: verified and yes the path to sqlplus is available.