You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Francis De Brabandere (JIRA)" <ji...@codehaus.org> on 2010/05/17 19:19:15 UTC

[jira] Created: (MSTAGE-14) DefaultRepositoryCopier rename script does not check move command exit codes

DefaultRepositoryCopier rename script does not check move command exit codes
----------------------------------------------------------------------------

                 Key: MSTAGE-14
                 URL: http://jira.codehaus.org/browse/MSTAGE-14
             Project: Maven 2.x Stage Plugin
          Issue Type: Improvement
    Affects Versions: 1.0-alpha-2
            Reporter: Francis De Brabandere


Only if the last move command fails will the plugin fail. This because the exit code for unix scipts is the one from the last command.

Better would be to use something like this:

#!/bin/sh
touch test.txt \
&& rm test.txt \
&& rm test2.txt \       <- fails here and won't continue
&& touch test2.txt \
rm test2.txt

this script will fail even if the last 2 commands would succeed (those will not even run)

I know this failing is something that is not common but still possible. We actually had this issue and it took quite some time to find out why certain builds failed and others not (depended on what the last mv command was).


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira