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

Commit c5dc6d3

Browse files
committed
exit if index-rules couldn't be found
1 parent ef2aa81 commit c5dc6d3

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

cmd/mt-index-prune/main.go

+3-2
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ func main() {
8686
cassI = i
8787
}
8888
}
89+
8990
if cassI == 0 {
9091
log.Println("only indextype 'cass' supported")
9192
flag.Usage()
@@ -95,14 +96,14 @@ func main() {
9596

9697
indexRules, err := conf.ReadIndexRules(indexRulesFile)
9798
if os.IsNotExist(err) {
98-
log.Fatalf("Index-rules.conf file %s does not exist; using defaults", indexRulesFile)
99+
log.Fatalf("Index-rules.conf file %s does not exist; exiting", indexRulesFile)
100+
os.Exit(1)
99101
}
100102
now := time.Now()
101103
cutoffs := indexRules.Cutoffs(now)
102104

103105
cassFlags.Parse(os.Args[cassI+1:])
104106
cassandra.CliConfig.Enabled = true
105-
106107
cassIdx := cassandra.New(cassandra.CliConfig)
107108
err = cassIdx.InitBare()
108109
perror(err)

0 commit comments

Comments
 (0)