From f1cca15bb24288fa181883d57f48d6af526e743d Mon Sep 17 00:00:00 2001 From: littlejian <17816869670@163.com> Date: Wed, 27 Oct 2021 18:48:11 +0800 Subject: [PATCH] early return when repo delete failed (#2613) --- modules/core-services/services/application/appliation.go | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/core-services/services/application/appliation.go b/modules/core-services/services/application/appliation.go index 9ac9aa1444a..7e70578250e 100644 --- a/modules/core-services/services/application/appliation.go +++ b/modules/core-services/services/application/appliation.go @@ -564,6 +564,7 @@ func (a *Application) Delete(applicationID int64) (*model.Application, error) { // 防止有老数据不存在repoID,还是以repo路径进行删除 if err = a.bdl.DeleteGitRepo(application.GitRepoAbbrev); err != nil { logrus.Errorf(err.Error()) + return nil, fmt.Errorf("failed to delete repo, please try again") } }