Is groovy -e a solution to this problem?

Jason

-----Original Message-----
From: Thibault Kruse [mailto:[email protected]] 
Sent: Friday, February 05, 2016 8:57 AM
To: [email protected]
Subject: Re: Groovysh in non-interactive mode

Yes, the JIRA ticket you mentioned is responsible for that (so blame me for the 
change). I don't have much time to discuss this now, next week will be better. 
You might comment on your case in the JIRA ticket. It should not be hard to add 
back a non-interactive mode to the interactive shell, even if that sounds 
strange.

On Fri, Feb 5, 2016 at 3:13 AM, cyprushelp <[email protected]> wrote:
> Hello,
>
> Groovysh no longer works in non-interactive mode.
>
> 1) Before Groovy 2.4, you could run groovysh in non-interactive mode. 
> It would execute the action and then quit. This made it useful when 
> embedding in shell scripts etc.
> 2) Before Groovy 2.4, you could pass arguments to groovysh in 
> non-interactive mode. For example, I had some custom commands which I 
> could execute not only from within the shell, but also outside of the shell.
>
> Both these features seem to be gone in latest Groovy 2.4.5 release. 
> They were useful and a lot of code depended on them. I wonder if 
> someone has any workarounds. I am not sure if the changes in
> https://issues.apache.org/jira/browse/GROOVY-6754 caused this.
>
> Before (groovy 2.3.9):
> user@machine:~$ groovysh :show all
> No variables defined
> No classes have been loaded
> No custom imports have been defined
> Preferences:
>     verbose=false
> ===> [null, null, null, null]
> user@machine:~$
>
> After (groovy 2.4.5):
> user@machine:~/opt/groovy-2.4.5/bin$ ./groovysh :show all Groovy Shell 
> (2.4.5, JVM: 1.8.0_51) Type ':help' or ':h' for help.
> ----------------------------------------------------------------------
> ----------------------------------------------------------------------
> ----------------------------------------------------------------
> groovy:000> :load :show
> File not found: ":show"
> groovy:000> :load all
> File not found: "all"
> groovy:000>

----------------------------------------------------------------------
This email message and any attachments are for the sole use of the intended 
recipient(s). Any unauthorized review, use, disclosure or distribution is 
prohibited. If you are not the intended recipient, please contact the sender by 
reply email and destroy all copies of the original message and any attachments.

Reply via email to