mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-02 17:20:53 +02:00
Fix 500 when repo has invalid .editorconfig
Creating a notice instead
This commit is contained in:
1 parent
ab12596143
commit
984fa8d83b
4 files changed
+31
-16
No files matched your search
@@ -179,12 +179,10 @@ func Diff(ctx *context.Context) {
|
||||
}
|
||||
}
|
||||
|
||||
ec, err := ctx.Repo.GetEditorconfig()
|
||||
if err != nil && !git.IsErrNotExist(err) {
|
||||
ctx.Handle(500, "ErrGettingEditorconfig", err)
|
||||
setEditorconfigIfExists(ctx)
|
||||
if ctx.Written() {
|
||||
return
|
||||
}
|
||||
ctx.Data["Editorconfig"] = ec
|
||||
|
||||
ctx.Data["CommitID"] = commitID
|
||||
ctx.Data["IsSplitStyle"] = ctx.Query("style") == "split"
|
||||
|
||||
Reference in new issue
Block a user