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

Jacques Le Roux reassigned OFBIZ-12927:
---------------------------------------

    Assignee: Jacques Le Roux

> pullAllPluginsSource.sh deleted local .git directory
> ----------------------------------------------------
>
>                 Key: OFBIZ-12927
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-12927
>             Project: OFBiz
>          Issue Type: Bug
>    Affects Versions: Upcoming Branch
>            Reporter: Daniel Watford
>            Assignee: Jacques Le Roux
>            Priority: Major
>
> Script file, pullAllPluginsSource.sh, deleted my local ofbiz-framework/.git 
> directory.
> The script ran into an issue cloning the ofbiz-plugins repository to a local 
> plugins directory. This mean that the plugins directory was not created, but 
> the following code was still executed:
> {quote}cd plugins
> rm -rf .git
> cd ..
> {quote}
> The `cd plugins` command failed, meaning the script's 
> current-working-directory was still the ofbiz-framework directory when the 
> next command `rm -rf .git` was executed.
> The script should be altered to not rely on changing directory before 
> carrying out destructive actions, such as rm. Further, there should be error 
> checking on earlier command that will exit the script if an earlier command 
> fails.
> Recommendation:
> 1. Replace the above code with:
> {quote}rm -r plugins/.git
> {quote}
> 2. Add `set -e` early in the script to configure exit if an error occurs on 
> any command.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to