Skip to content

Commit

Permalink
Fix key and certificate flag detection
Browse files Browse the repository at this point in the history
  • Loading branch information
Will Alexander committed Oct 10, 2015
1 parent 271d5d1 commit 57bdd6a
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions river.go
Original file line number Diff line number Diff line change
Expand Up @@ -644,8 +644,12 @@ func main() {
fcertSet := false
fkeySet := false
flag.Visit(func(f *flag.Flag) {
fcertSet = f.Name == fcertName
fkeySet = f.Name == fkeyName
if f.Name == fcertName {
fcertSet = true
}
if f.Name == fkeyName {
fkeySet = true
}
})
if fcertSet && !fkeySet {
log.Fatalf("%s flag set without %s", fcertName, fkeyName)
Expand Down

0 comments on commit 57bdd6a

Please sign in to comment.