CLI returns exit code 0 even when an error occurs

Thomas Segismont tsegismo at redhat.com
Fri Nov 22 10:04:25 UTC 2013


Created Bug 1033520 - CLI returns exit code 0 even when an error occurs
https://bugzilla.redhat.com/show_bug.cgi?id=1033520

Le 21/11/2013 18:33, Larry O'Leary a écrit :
> +1
> -- Larry O'Leary https://plus.google.com/+LarryOLeary On Thu, 2013-11-21
> at 16:56 +0100, Thomas Segismont wrote:
>> >Le 21/11/2013 15:01, Jay Shaughnessy a écrit :
>>> > >
>>> > >I don't know if it's intentional but it would be a "public" behavioral
>>> > >change if we alter it now .  If fixed we may need to make the exit
>>> > >behavior conditional, and not change the default behavior from what it
>>> > >does today. I'm not sure.
>> >
>> >My opinion is that it would be preferable to change this behavior,
>> >because it is faulty. We can add a switch for retro-compatibility later,
>> >if needed.
>> >
>>> > >
>>> > >On 11/21/2013 8:15 AM, Thomas Segismont wrote:
>>>> > >>Hi everyone,
>>>> > >>
>>>> > >>Yesterday evening I was adding some tests to the Maven plugin for
>>>> > >>Agent plugins I started some time ago:
>>>> > >>https://github.com/rhq-project/rhq-agent-plugin-plugin
>>>> > >>
>>>> > >>In particular, for the exec CLI command/script mojos. Here are the
>>>> > >>test POMs:
>>>> > >>https://github.com/rhq-project/rhq-agent-plugin-plugin/blob/master/src/itest/exec-cli-command/pom.xml
>>>> > >>
>>>> > >>https://github.com/rhq-project/rhq-agent-plugin-plugin/blob/master/src/itest/exec-cli-script/pom.xml
>>>> > >>
>>>> > >>
>>>> > >>These mojos have a 'failOnError' attribute. So I wanted to write a
>>>> > >>test with a failing CLI script. For example:
>>>> > >>====
>>>> > >>throw "An error"
>>>> > >>====
>>>> > >>(You can throw any object in Javascript)
>>>> > >>
>>>> > >>When you run the CLI with such a command/script you actually see a
>>>> > >>JavascriptException. But the CLI exit code is 0
>>>> > >>
>>>> > >>I think it's a bug, but I'm asking in case this is intentional.
>>>> > >>
>>>> > >>Thanks,
>>>> > >>Thomas
>>>> > >>_______________________________________________
>>>> > >>rhq-devel mailing list
>>>> > >>rhq-devel at lists.fedorahosted.org
>>>> > >>https://lists.fedorahosted.org/mailman/listinfo/rhq-devel
>>> > >
>>> > >_______________________________________________
>>> > >rhq-devel mailing list
>>> > >rhq-devel at lists.fedorahosted.org
>>> > >https://lists.fedorahosted.org/mailman/listinfo/rhq-devel
>> >
>> >_______________________________________________
>> >rhq-devel mailing list
>> >rhq-devel at lists.fedorahosted.org
>> >https://lists.fedorahosted.org/mailman/listinfo/rhq-devel
> _______________________________________________
> rhq-devel mailing list
> rhq-devel at lists.fedorahosted.org
> https://lists.fedorahosted.org/mailman/listinfo/rhq-devel
>



More information about the rhq-devel mailing list