Ah! Just found the issues DB, and this one is JENKINS-11992.

On Tuesday, October 2, 2012 2:11:12 PM UTC-7, Steven Cole wrote:
>
> Hey there...
>
> Our Jenkins setup has a Linux master node and a Windows slave node (so 
> that we can build for both platforms). The Windows slave node is new.
>
> When I configure a windows build to run a batch file, and call the MS 
> Visual Studio "vcvarsall" batch file to set up compiler paths and options 
> prior to running msbuild, I was getting the following error:
>
> \Java\jre7\bin"" was unexpected at this time.
>
>
> It took some digging, but it turns out that the problem is that somehow 
> when a batch file is run on a windows slave, the path to Java binaries is 
> added to the PATH variable at the start, and if that path to Java binaries 
> happens to have embedded blanks, the bit which is added is enclosed within 
> quotation marks.
>
> For windows, however, this is bad. Extra quotes don't get stripped out.
>
> When the vcvarsall batch file was run afterwards, those extra quotation 
> marks made the "set" command extremely confused. The PATH variable itself 
> doesn't actually need quotes.
>
> The workaround is to reset the PATH by hand before calling the vcvarsall 
> batch file, which fixes things just fine but is exceedingly annoying. 
>
> Is this the right forum for reporting trouble?
>
> Thanks...
> --Steven Cole
>

Reply via email to