[ 
https://issues.apache.org/jira/browse/GROOVY-8821?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Akom updated GROOVY-8821:
-------------------------
    Description: 
groovy.bat relies on c:\windows\system32\find.exe, which is notably absent in 
Microsoft containers.  There is some logic to avoid clashing with cygwin's 
version of find.exe (which I do have), but it doesn't cover the case of the 
correct find.exe missing altogether.

When running Jenkins, this is what I see:
{noformat}
Unpacking 
 https://dl.bintray.com/groovy/maven/apache-groovy-binary-2.5.2.zip
 to c:\jenkinswork\tools\hudson.plugins.groovy.GroovyInstallation\Groovy_Latest 
on docker-003fbd390qkb2 on Windows 01
 [00b97b92] $ 
c:\jenkinswork\tools\hudson.plugins.groovy.GroovyInstallation\Groovy_Latest\bin\groovy.bat
 
c:\jenkinswork\workspace\infra\test-docker-windows-temp\00b97b92\hudson7647040981337869977.groovy
 find: '/I': No such file or directory
 find: '/C': No such file or directory
ERROR: JAVA_HOME is set to an invalid directory: c:\jenkins\jdk\JDK_1.9
 Please set the JAVA_HOME variable in your environment
{noformat}
As you can see, the error message is rather misleading. 

The real issue is that groovy.bat winds up using cygwin's find.exe that has an 
entirely different purpose.

  was:
groovy.bat relies on c:\windows\system32\find.exe, which is notably absent in 
Microsoft containers.  There is some logic to avoid clashing with cygwin's 
version of find.exe (which I do have), but it doesn't cover the case of the 
correct find.exe missing altogether.

When running Jenkins, this is what I see:
{noformat}
Unpacking 
 https://dl.bintray.com/groovy/maven/apache-groovy-binary-2.5.2.zip
 to c:\jenkinswork\tools\hudson.plugins.groovy.GroovyInstallation\Groovy_Latest 
on docker-003fbd390qkb2 on Windows 01
 [00b97b92] $ 
c:\jenkinswork\tools\hudson.plugins.groovy.GroovyInstallation\Groovy_Latest\bin\groovy.bat
 
c:\jenkinswork\workspace\infra\test-docker-windows-temp\00b97b92\hudson7647040981337869977.groovy
 find: '/I': No such file or directory
 find: '/C': No such file or directory
ERROR: JAVA_HOME is set to an invalid directory: c:\jenkins\jdk\JDK_1.9
 Please set the JAVA_HOME variable in your environment
{noformat}
As you can see, the error message is rather misleading. 


> groovy.bat doesn't work in Windows Docker nanoserver based containers
> ---------------------------------------------------------------------
>
>                 Key: GROOVY-8821
>                 URL: https://issues.apache.org/jira/browse/GROOVY-8821
>             Project: Groovy
>          Issue Type: Bug
>         Environment: Groovy 2.5.2 (or 2.4.3)
> Windows 2016 host with microsoft/nanoserver based Docker container
>            Reporter: Akom
>            Priority: Minor
>              Labels: contrib
>
> groovy.bat relies on c:\windows\system32\find.exe, which is notably absent in 
> Microsoft containers.  There is some logic to avoid clashing with cygwin's 
> version of find.exe (which I do have), but it doesn't cover the case of the 
> correct find.exe missing altogether.
> When running Jenkins, this is what I see:
> {noformat}
> Unpacking 
>  https://dl.bintray.com/groovy/maven/apache-groovy-binary-2.5.2.zip
>  to 
> c:\jenkinswork\tools\hudson.plugins.groovy.GroovyInstallation\Groovy_Latest 
> on docker-003fbd390qkb2 on Windows 01
>  [00b97b92] $ 
> c:\jenkinswork\tools\hudson.plugins.groovy.GroovyInstallation\Groovy_Latest\bin\groovy.bat
>  
> c:\jenkinswork\workspace\infra\test-docker-windows-temp\00b97b92\hudson7647040981337869977.groovy
>  find: '/I': No such file or directory
>  find: '/C': No such file or directory
> ERROR: JAVA_HOME is set to an invalid directory: c:\jenkins\jdk\JDK_1.9
>  Please set the JAVA_HOME variable in your environment
> {noformat}
> As you can see, the error message is rather misleading. 
> The real issue is that groovy.bat winds up using cygwin's find.exe that has 
> an entirely different purpose.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to