fork of https://github.com/sourcegraph/zoekt
0

Configure Feed

Select the types of activity you want to include in your feed.

zoekt-indexserver: Prevent invalid config from causing an NPE (#612)

When the user specifies an invalid mirror config that contains an entry
without any of the GithubUser / GithubOrg / ... repository definitions,
zoekt-indexserver would crash, because `cmd` stays `nil` and causes a
SIGSEGV when it is later accessed in `main.executeMirror`.

+3
+3
cmd/zoekt-indexserver/config.go
··· 260 260 cmd.Args = append(cmd.Args, "-active") 261 261 } 262 262 cmd.Args = append(cmd.Args, c.GerritApiURL) 263 + } else { 264 + log.Printf("executeMirror: ignoring config, because it does not contain any valid repository definition: %q", c) 265 + continue 263 266 } 264 267 265 268 stdout, _ := loggedRun(cmd)