Skip to content
This repository has been archived by the owner on Aug 23, 2023. It is now read-only.

Commit

Permalink
exit if index-rules couldn't be found
Browse files Browse the repository at this point in the history
  • Loading branch information
replay committed Mar 7, 2019
1 parent ef2aa81 commit c5dc6d3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cmd/mt-index-prune/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ func main() {
cassI = i
}
}

if cassI == 0 {
log.Println("only indextype 'cass' supported")
flag.Usage()
Expand All @@ -95,14 +96,14 @@ func main() {

indexRules, err := conf.ReadIndexRules(indexRulesFile)
if os.IsNotExist(err) {
log.Fatalf("Index-rules.conf file %s does not exist; using defaults", indexRulesFile)
log.Fatalf("Index-rules.conf file %s does not exist; exiting", indexRulesFile)
os.Exit(1)
}
now := time.Now()
cutoffs := indexRules.Cutoffs(now)

cassFlags.Parse(os.Args[cassI+1:])
cassandra.CliConfig.Enabled = true

cassIdx := cassandra.New(cassandra.CliConfig)
err = cassIdx.InitBare()
perror(err)
Expand Down

0 comments on commit c5dc6d3

Please sign in to comment.