summaryrefslogtreecommitdiffstats
path: root/models/release.go
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2015-11-26 17:33:45 -0500
committerUnknwon <u@gogs.io>2015-11-26 17:33:45 -0500
commitc50a3503e6e8ece0dabd109932a72fe093c3cab3 (patch)
treed9918c4b9c5d5efc94771cae22231fdcc0796102 /models/release.go
parent2b10fdc4dcb987b347b031f460cf4f02fd48a31a (diff)
downloadgitea-c50a3503e6e8ece0dabd109932a72fe093c3cab3.tar.gz
gitea-c50a3503e6e8ece0dabd109932a72fe093c3cab3.zip
introduce git-shell
Diffstat (limited to 'models/release.go')
-rw-r--r--models/release.go8
1 files changed, 2 insertions, 6 deletions
diff --git a/models/release.go b/models/release.go
index ef1d640d72..fbb7b9a85e 100644
--- a/models/release.go
+++ b/models/release.go
@@ -175,12 +175,8 @@ func DeleteReleaseByID(id int64) error {
return fmt.Errorf("GetRepositoryByID: %v", err)
}
- repoPath, err := repo.RepoPath()
- if err != nil {
- return fmt.Errorf("RepoPath: %v", err)
- }
-
- _, stderr, err := process.ExecDir(-1, repoPath, fmt.Sprintf("DeleteReleaseByID (git tag -d): %d", rel.ID),
+ _, stderr, err := process.ExecDir(-1, repo.RepoPath(),
+ fmt.Sprintf("DeleteReleaseByID (git tag -d): %d", rel.ID),
"git", "tag", "-d", rel.TagName)
if err != nil && !strings.Contains(stderr, "not found") {
return fmt.Errorf("git tag -d: %v - %s", err, stderr)