You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "Michajlo Matijkiw (Updated) (JIRA)" <ji...@apache.org> on 2012/01/03 22:32:39 UTC

[jira] [Updated] (HADOOP-7948) Shell scripts created by hadoop-dist/pom.xml to build tar do not properly propagate failure

     [ https://issues.apache.org/jira/browse/HADOOP-7948?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michajlo Matijkiw updated HADOOP-7948:
--------------------------------------

    Status: Patch Available  (was: Open)

Retain result of failing call and use it as exit code.
                
> Shell scripts created by hadoop-dist/pom.xml to build tar do not properly propagate failure
> -------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-7948
>                 URL: https://issues.apache.org/jira/browse/HADOOP-7948
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: build
>         Environment: OSX
>            Reporter: Michajlo Matijkiw
>            Priority: Minor
>
> The run() function, as defined in dist-layout-stitching.sh and dist-tar-stitching, created in hadoop-dist/pom.xml, does not properly propagate the error code of a failing command.  See the following:
> {code}
>     ...
>     "${@}"                 # call fails with non-zero exit code
>     if [ $? != 0 ]; then   
>         echo               
>         echo "Failed!"     
>         echo               
>         exit $?            # $?=result of echo above, likely 0, thus exit with code 0
>     ...
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira