mirror of
https://github.com/go-gitea/gitea
synced 2025-01-26 01:24:28 +00:00
* Fix nil reference Signed-off-by: jolheiser <john.olheiser@gmail.com> * Tighten Signed-off-by: jolheiser <john.olheiser@gmail.com>
This commit is contained in:
parent
04a77b1f42
commit
a2b7cc1bb1
@ -124,6 +124,7 @@ func generateRepoCommit(e Engine, repo, templateRepo, generateRepo *Repository,
|
||||
return fmt.Errorf("checkGiteaTemplate: %v", err)
|
||||
}
|
||||
|
||||
if gt != nil {
|
||||
if err := os.Remove(gt.Path); err != nil {
|
||||
return fmt.Errorf("remove .giteatemplate: %v", err)
|
||||
}
|
||||
@ -161,6 +162,7 @@ func generateRepoCommit(e Engine, repo, templateRepo, generateRepo *Repository,
|
||||
return err
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if err := git.InitRepository(tmpDir, false); err != nil {
|
||||
return err
|
||||
|
Loading…
x
Reference in New Issue
Block a user