Executing command line process on OS X

I have a script with the following code:

def command = "cvs log $"
def proc = command.execute()
proc.waitFor()
println "exit: ${proc.exitValue()}"
def logInfo = proc.in.text

This works from the command line (and from TextMate) but the exitValue is 1 when run from IntelliJ IDEA on OS X. Do I need to do something differently to execute this in the shell from IntelliJ?

Thanks!

Todd

3 comments
Comment actions Permalink

Todd,

Make sure, that working directory, adjusted in your script run configuration in IDEA is you want to use to perform VCS command from. It seems, that environment of your external process is different from that when you run it from the command line.

With best regards,
Ilya

Edited by: Ilya Sergey on Oct 16, 2008 9:54 PM

0
Comment actions Permalink

Ilya

I think that is the problem, but I cannot change the working directory because IntelliJ is throwing an exception everytime I try to open the Groovy Script run configuration. I reverted back to IntelliJ IDEA 7.0.4 and the script runs with the updated working directory.

Thanks

Todd

0
Comment actions Permalink

Todd,

Broken run configuration is a problem of last EAP. I've fixed it and this fix will be available with next eap.

With best regards,
Ilya

0

Please sign in to leave a comment.