You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ofbiz.apache.org by "Jacques Le Roux (Jira)" <ji...@apache.org> on 2024/03/16 07:01:00 UTC
[jira] [Closed] (OFBIZ-12927) pullAllPluginsSource.sh deleted local .git directory
[ https://issues.apache.org/jira/browse/OFBIZ-12927?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jacques Le Roux closed OFBIZ-12927.
-----------------------------------
Fix Version/s: Upcoming Branch
Resolution: Fixed
Thanks Daniel
> 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
> Fix For: Upcoming Branch
>
>
> 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)