1 Sep 2005 11:45
RE: Getting the exit status of another Groovy script
> > On 22/08/05, Antti Karanta <antti.karanta@...> wrote: > > > > C:\Temp>groovy -e "def p='cmd /c groovy > > > exc.groovy'.execute();p.waitFor();println p.exitValue()" > > > 0 > > > > > > C:\Temp>groovy -e "def p='groovy > > > exc.groovy'.execute();p.waitFor();println p.exitValue()" > > > Caught: java.io.IOException: CreateProcess: groovy > > exc.groovy error=2 > > > > So it meanse cmd returns 0 because the shell command succeeds to > > execute your script? And we don't get the return value of > the script? > > That's my theory. If anybody knows any better feel free to comment. > > > I was wondering about why I wan't able to execute the groovy script > w/out cmd /c, so I tried the same thing w/ perl and ruby: > > C:\Temp>ruby -e "system('groovy exc.groovy');puts $?" > -1 > > C:\Temp>perl -e "system('groovy exc.groovy');print $?" > moi! > 0 > C:\Temp>(Continue reading)
RSS Feed