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
请先登录再写评论。
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
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
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