[
https://issues.apache.org/jira/browse/METRON-720?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15872952#comment-15872952
]
ASF GitHub Bot commented on METRON-720:
---------------------------------------
Github user mattf-horton commented on the issue:
https://github.com/apache/incubator-metron/pull/455
I've tested it to completion on both Centos 6 and 7. It works and
generates identical src and site file trees. I also tested the trap on SIGINT,
which worked on all three platforms. I tested the trap on ERR but only on Mac.
@JonZeolla , the 'rm -f outfile' before 'blah 2> outfile' may be
unnecessary. I did so on the premise that the file might pre-exist and be
readonly. In that case, I'm not sure whether the '>' operator deletes the
file, or attempts to rewrite it; the former would succeed, the latter would
fail. Whereas the 'rm -f' is guaranteed to succeed, because we earlier tested
the parent directory for write privs.
At any rate, as you observed, it is at worst unnecessary but harmless.
Thanks for the +1.
> modify generate-md.sh to re-throw errors from within 'find'
> -----------------------------------------------------------
>
> Key: METRON-720
> URL: https://issues.apache.org/jira/browse/METRON-720
> Project: Metron
> Issue Type: Bug
> Affects Versions: 0.3.1
> Reporter: Matt Foley
>
> In the site-book build tools, bin/generate-md.sh invokes
> bin/fix-md-dialect.py from within a `find -exec` context. If
> fix-md-dialect.py encounters errors, it outputs error messages on stderr, but
> these messages may get lost in the rest of the output, and the exit status of
> the script just indicates success.
> Modify the invocation of `find` to capture the error condition, complain
> about it in a way that does not get lost amongst the other output, and cause
> bin/generate-md.sh to exit with a failure condition.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)