[prev in list] [next in list] [prev in thread] [next in thread] 

List:       groovy-scm
Subject:    [jira] Assigned: (GROOVY-977) "...".execute ( ) does not work as it used to
From:       "Russel Winder (JIRA)" <jira () codehaus ! org>
Date:       2005-07-29 12:09:57
Message-ID: 21415230.1122638997752.JavaMail.haus-jira () codehaus01 ! managed ! contegix ! com
[Download RAW message or body]

     [ http://jira.codehaus.org/browse/GROOVY-977?page=all ]

Russel Winder reassigned GROOVY-977:
------------------------------------

    Assign To: Russel Winder

> "...".execute ( ) does not work as it used to
> ---------------------------------------------
> 
> Key: GROOVY-977
> URL: http://jira.codehaus.org/browse/GROOVY-977
> Project: groovy
> Type: Bug
> Environment: Debian GNU/Linux Testing ; JDK1.5.0_04-b05 ; Groovy  CVS HEAD \
>                 2005-07-20 12:09
> Reporter: Russel Winder
> Assignee: Russel Winder
> Priority: Critical

> 
> 
> The Groovy script:
> def command = "sh -c 'ant'"
> println ("Executing: " + command )
> def process = command.execute ( )
> process.in.eachLine { println ( "Got the line: " + it ) }
> works fine.  The current directory has a build.xml whose default action is to clean \
> and then create a file to show it has executed.  I have a directory TrialDir with \
> exactly the same build.xml (actually it is a symbolic link not a copy so it is \
> identical). However the script:
> def command = "sh -c 'cd TrialDir && ant'"
> println ("Executing: " + command )
> def process = command.execute ( )
> process.in.eachLine { println ( "Got the line: " + it ) }
> fails to run ant at all.  Moreover the script
> def command = "sh -c 'echo 1'"
> println ("Executing: " + command )
> def process = command.execute ( )
> process.in.eachLine { println ( "Got the line: " + it ) }
> fails to output 1:
> > > echoFail.groovy
> Executing: sh -c 'echo 1'
> It seems that there is something weird either with my understanding or with the \
> execution.  I think it is the latter as scripts that used to work fine three months \
> ago now do not work.  Something either with string handling or with command \
> execution appears to have changed recently creating this inconsistency.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic