Skip to content

Commit

Permalink
main : check --config-check should has --config flag specified first. (
Browse files Browse the repository at this point in the history
  • Loading branch information
AilinKid authored and sre-bot committed Aug 27, 2019
1 parent 3601f21 commit e37d5f9
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tidb-server/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,12 @@ func loadConfig() string {
return err.Error()
}
terror.MustNil(err)
} else {
// configCheck should have the config file specified.
if *configCheck {
fmt.Fprintln(os.Stderr, "config check failed", errors.New("no config file specified for config-check"))
os.Exit(1)
}
}
return ""
}
Expand Down

0 comments on commit e37d5f9

Please sign in to comment.