mirror of
https://github.com/tulir/mautrix-whatsapp
synced 2024-11-15 22:42:35 +01:00
Don't require config for --version
This commit is contained in:
parent
f3793309a0
commit
0f7163a294
1 changed files with 9 additions and 9 deletions
18
main.go
18
main.go
|
@ -370,15 +370,6 @@ func (bridge *Bridge) Main() {
|
|||
} else if *migrateFrom {
|
||||
bridge.MigrateDatabase()
|
||||
return
|
||||
} else if *version {
|
||||
if Tag == Version {
|
||||
fmt.Printf("%s %s (%s)\n", Name, Tag, BuildTime)
|
||||
} else if len(Commit) > 8 {
|
||||
fmt.Printf("%s %s.%s (%s)\n", Name, Version, Commit[:8], BuildTime)
|
||||
} else {
|
||||
fmt.Printf("%s %s+dev.unknown\n", Name, Version)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
bridge.Init()
|
||||
|
@ -408,6 +399,15 @@ func main() {
|
|||
} else if *wantHelp {
|
||||
flag.PrintHelp()
|
||||
os.Exit(0)
|
||||
} else if *version {
|
||||
if Tag == Version {
|
||||
fmt.Printf("%s %s (%s)\n", Name, Tag, BuildTime)
|
||||
} else if len(Commit) > 8 {
|
||||
fmt.Printf("%s %s.%s (%s)\n", Name, Version, Commit[:8], BuildTime)
|
||||
} else {
|
||||
fmt.Printf("%s %s.unknown\n", Name, Version)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
NewBridge().Main()
|
||||
|
|
Loading…
Reference in a new issue