mirror of
https://github.com/go-gitea/gitea
synced 2024-12-22 16:34:16 +01:00
Improve argument parsing for serve command
This commit is contained in:
parent
aa35be975f
commit
b7e26aa5e3
1 changed files with 4 additions and 1 deletions
|
@ -90,7 +90,10 @@ func runServ(k *cli.Context) {
|
|||
}
|
||||
setup("serv.log")
|
||||
|
||||
keys := strings.Split(os.Args[2], "-")
|
||||
if len(k.Args()) < 1 {
|
||||
log.GitLogger.Fatal(2, "Not enough arguments")
|
||||
}
|
||||
keys := strings.Split(k.Args()[0], "-")
|
||||
if len(keys) != 2 {
|
||||
println("Gogs: auth file format error")
|
||||
log.GitLogger.Fatal(2, "Invalid auth file format: %s", os.Args[2])
|
||||
|
|
Loading…
Reference in a new issue