[ 
https://issues.apache.org/jira/browse/OFBIZ-12927?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17827799#comment-17827799
 ] 

Jacques Le Roux edited comment on OFBIZ-12927 at 3/17/24 5:32 PM:
------------------------------------------------------------------

Hi Daniel,

Yes I understood and tried. As it failed I rather removed it and used a 
logically safe way.

I have just re-added it again with 
https://gitbox.apache.org/repos/asf?p=ofbiz-framework.git;h=a158c61f0a
And it failed again, with some others you can find at 
https://github.com/apache/ofbiz-framework/actions

Seems GH does not appreciate, not sure why.

Disclaimer: I did not test the change as it's so simple. Did I miss something?


was (Author: jacques.le.roux):
Hi Daniel,

Yes I understood and tried. As it failed I rather removed it and used a 
logically safe way.

I have just re-added it again with 
https://gitbox.apache.org/repos/asf?p=ofbiz-framework.git;h=a158c61f0a
And it failed again, with some others you can find at 
https://github.com/apache/ofbiz-framework/actions

Seems GH does not appreciated, not sure why.

Disclaimer: I did not test the change as it's so simple. Did I miss something?

> 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)

Reply via email to