mirror of
https://git.mills.io/saltyim/saltyim.git
synced 2024-06-28 09:41:02 +00:00
Fix version handling
This commit is contained in:
parent
03c863c028
commit
ae2199bff4
@ -49,7 +49,7 @@ See https://salty.im for more details.`,
|
|||||||
// and sets flags appropriately.
|
// and sets flags appropriately.
|
||||||
// This is called by main.main(). It only needs to happen once to the rootCmd.
|
// This is called by main.main(). It only needs to happen once to the rootCmd.
|
||||||
func Execute() {
|
func Execute() {
|
||||||
if os.Args[1] == "-v" || os.Args[1] == "--version" {
|
if len(os.Args) == 2 && (os.Args[1] == "-v" || os.Args[1] == "--version") {
|
||||||
if err := rootCmd.Execute(); err != nil {
|
if err := rootCmd.Execute(); err != nil {
|
||||||
fmt.Println(err)
|
fmt.Println(err)
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
|
@ -101,7 +101,7 @@ func main() {
|
|||||||
parseArgs()
|
parseArgs()
|
||||||
|
|
||||||
if version {
|
if version {
|
||||||
fmt.Printf("saltyd version %s", saltyim.FullVersion())
|
fmt.Printf("saltyd %s", saltyim.FullVersion())
|
||||||
os.Exit(0)
|
os.Exit(0)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
version https://git-lfs.github.com/spec/v1
|
||||||
oid sha256:1ffabfaf081c9fd4e29534d722e2798832af879bf2c419528bdbf4f03eb475e8
|
oid sha256:62776cf8369416668d4a77ff87adbd68b5bc45a0adbbdfda9a67ff08afe3c3a8
|
||||||
size 29647733
|
size 29651160
|
||||||
|
Loading…
Reference in New Issue
Block a user