|
View:
New views
5 Messages
—
Rating Filter:
Alert me
|
|
|
Exit codes.I've noticed that AsciiDoc has only two possible exit codes: 0 and 1.
I've been working on a mechanism to check the validity of submitted asciidoc files, and I'd like to be able to distinguish -using exit codes- between an input file that either: - has no problems - raises warnings - raises errors - causes asciidoc to fail. -- Miguel Farah miguel@... _______________________________________________ asciidoc-discuss mailing list asciidoc-discuss@... http://lists.metaperl.com/cgi-bin/mailman/listinfo/asciidoc-discuss |
|
|
Re: Exit codes.Miguel Farah wrote:
> I've noticed that AsciiDoc has only two possible exit codes: 0 and 1. > > I've been working on a mechanism to check the validity of submitted > asciidoc files, and > I'd like to be able to distinguish -using exit codes- between an input > file that either: > - has no problems > - raises warnings > - raises errors > - causes asciidoc to fail. > The only problem would be a non-zero exit code for warnings. Warnings do not currently generate a non-zero exit code, this would introduce compatibility problems for scripts that run asciidoc and test for a non-zero exit cod, they would now fail if there were any warnings where previously they did not. Cheers, Stuart -- Stuart Rackham _______________________________________________ asciidoc-discuss mailing list asciidoc-discuss@... http://lists.metaperl.com/cgi-bin/mailman/listinfo/asciidoc-discuss |
|
|
Re: Exit codes.On Thu, Mar 27, 2008 at 9:14 PM, Stuart Rackham <srackham@...> wrote:
> > Miguel Farah wrote: > > I've noticed that AsciiDoc has only two possible exit codes: 0 and 1. > > > > I've been working on a mechanism to check the validity of submitted > > asciidoc files, and > > I'd like to be able to distinguish -using exit codes- between an input > > file that either: > > - has no problems > > - raises warnings > > - raises errors > > - causes asciidoc to fail. > > The only problem would be a non-zero exit code for warnings. Warnings do > not currently generate a non-zero exit code, this would introduce > compatibility problems for scripts that run asciidoc and test for a > non-zero exit cod, they would now fail if there were any warnings where > previously they did not. I noticed that, too. Perhaps there could be an option to have "regular" exit codes or "strict" exit codes (does that make any sense?). -- Miguel Farah miguel@... _______________________________________________ asciidoc-discuss mailing list asciidoc-discuss@... http://lists.metaperl.com/cgi-bin/mailman/listinfo/asciidoc-discuss |
|
|
Re: Exit codes.Miguel Farah wrote:
> On Thu, Mar 27, 2008 at 9:14 PM, Stuart Rackham <srackham@...> wrote: >> Miguel Farah wrote: >> > I've noticed that AsciiDoc has only two possible exit codes: 0 and 1. >> > >> > I've been working on a mechanism to check the validity of submitted >> > asciidoc files, and >> > I'd like to be able to distinguish -using exit codes- between an input >> > file that either: >> > - has no problems >> > - raises warnings >> > - raises errors >> > - causes asciidoc to fail. >> >> The only problem would be a non-zero exit code for warnings. Warnings do >> not currently generate a non-zero exit code, this would introduce >> compatibility problems for scripts that run asciidoc and test for a >> non-zero exit cod, they would now fail if there were any warnings where >> previously they did not. > > I noticed that, too. > > Perhaps there could be an option to have "regular" exit codes or "strict" > exit codes (does that make any sense?). > I guess, but to my way of thinking it's a bit of an overkill, maybe the version 9 API route would be better for fine grained processing control. Stuart -- _______________________________________________ asciidoc-discuss mailing list asciidoc-discuss@... http://lists.metaperl.com/cgi-bin/mailman/listinfo/asciidoc-discuss |
|
|
Re: Exit codes.On Fri, Mar 28, 2008 at 12:20 AM, Stuart Rackham <srackham@...> wrote:
> Miguel Farah wrote: > > On Thu, Mar 27, 2008 at 9:14 PM, Stuart Rackham <srackham@...> wrote: > >> Miguel Farah wrote: > >> > I've noticed that AsciiDoc has only two possible exit codes: 0 and 1. > >> > > >> > I've been working on a mechanism to check the validity of submitted > >> > asciidoc files, and > >> > I'd like to be able to distinguish -using exit codes- between an input > >> > file that either: > >> > - has no problems > >> > - raises warnings > >> > - raises errors > >> > - causes asciidoc to fail. > >> > >> The only problem would be a non-zero exit code for warnings. Warnings do > >> not currently generate a non-zero exit code, this would introduce > >> compatibility problems for scripts that run asciidoc and test for a > >> non-zero exit cod, they would now fail if there were any warnings where > >> previously they did not. > > > > I noticed that, too. > > > > Perhaps there could be an option to have "regular" exit codes or "strict" > > exit codes (does that make any sense?). > > > > I guess, but to my way of thinking it's a bit of an overkill, maybe the > version 9 API route would be better for fine grained processing control. You're right. I'll wait. :-) -- Miguel Farah miguel@... _______________________________________________ asciidoc-discuss mailing list asciidoc-discuss@... http://lists.metaperl.com/cgi-bin/mailman/listinfo/asciidoc-discuss |
| Free embeddable forum powered by Nabble | Forum Help |