I’m having a strange unexpected issue that is difficult to research for because of the command line context. Basically I’m testing a gradle script on Windows that has been working on Linux. The output suggests, and I have verified, that the args to gradle are getting passed to this exec call within the script, and they should not be.
Here’s the output:
Starting process ‘command ‘F:\jenkins\workspace\OEM_Gradle_Test\build/emsdk/bin/empdk.bat’’. Working directory:
F:\jenkins\workspace\OEM_Gradle_Test Command: F:\jenkins\workspace\OEM_Gradle_Test\build/emsdk/bin/empdk.bat create_plugin -stage_dir F:\jenkins\workspace\OEM_Gradle_Test\build\opar -out_dir F:\jenkins\workspace\OEM_Gradle_Test\build -tmp_dir F:\jenkins\workspace\OEM_Gradle_Test\build\tmp\createPlugin
Successfully started process ‘command ‘F:\jenkins\workspace\OEM_Gradle_Test\build/emsdk/bin/empdk.bat’’
Error :unknown parameter: --info
There’s no --info parameter passed in this gradle script:
exec {
commandLine "${emSdk.dir}/bin/${empdkBin}", 'create_plugin', '-stage_dir', fixPath("${stageDir2}"), '-out_dir', fixPath("${buildDir}"), '-tmp_dir', fixPath("${temporaryDir}")
}
The --info parameter actually comes from the gradle commandline itself. I verified this by removing --info from the gradle command and then the build fails with “Error :unknown parameter: build” which is the name of the build target.
For context, this build is started by the Jenkins Gradle plugin.