File tree Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change
1
+ // Copyright 2019 The Gitea Authors. All rights reserved.
2
+ // Use of this source code is governed by a MIT-style
3
+ // license that can be found in the LICENSE file.
4
+
5
+ package cmd
6
+
7
+ import (
8
+ "github.com/urfave/cli"
9
+
10
+ "code.gitea.io/gitea/modules/setting"
11
+ )
12
+
13
+ // CmdDoctor represents the available doctor sub-command.
14
+ var CmdDoctor = cli.Command {
15
+ Name : "doctor" ,
16
+ Usage : "Diagnose the problems" ,
17
+ Description : "A command to diagnose the problems of current gitea instance according the given configuration." ,
18
+ Action : runDoctor ,
19
+ }
20
+
21
+ func runDoctor (ctx * cli.Context ) error {
22
+ if err := initDB (); err != nil {
23
+ return err
24
+ }
25
+
26
+ runDoctorLocationMoved (ctx )
27
+ }
28
+
29
+ func runDoctorLocationMoved (ctx * cliContext ) {
30
+ setting .RepoRootPath
31
+ }
You can’t perform that action at this time.
0 commit comments