From ae2199bff4317779adcbdf3967761ea73d84e1b9 Mon Sep 17 00:00:00 2001 From: James Mills <1290234+prologic@users.noreply.github.com> Date: Sat, 14 Jan 2023 12:05:29 +1000 Subject: [PATCH] Fix version handling --- cmd/salty-chat/root.go | 2 +- cmd/saltyd/main.go | 2 +- internal/web/app.wasm | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cmd/salty-chat/root.go b/cmd/salty-chat/root.go index bffeb3e..026ef6a 100644 --- a/cmd/salty-chat/root.go +++ b/cmd/salty-chat/root.go @@ -49,7 +49,7 @@ See https://salty.im for more details.`, // and sets flags appropriately. // This is called by main.main(). It only needs to happen once to the rootCmd. 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 { fmt.Println(err) os.Exit(1) diff --git a/cmd/saltyd/main.go b/cmd/saltyd/main.go index 7f6281b..be3fecf 100644 --- a/cmd/saltyd/main.go +++ b/cmd/saltyd/main.go @@ -101,7 +101,7 @@ func main() { parseArgs() if version { - fmt.Printf("saltyd version %s", saltyim.FullVersion()) + fmt.Printf("saltyd %s", saltyim.FullVersion()) os.Exit(0) } diff --git a/internal/web/app.wasm b/internal/web/app.wasm index 8701b11..f5087b4 100755 --- a/internal/web/app.wasm +++ b/internal/web/app.wasm @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1ffabfaf081c9fd4e29534d722e2798832af879bf2c419528bdbf4f03eb475e8 -size 29647733 +oid sha256:62776cf8369416668d4a77ff87adbd68b5bc45a0adbbdfda9a67ff08afe3c3a8 +size 29651160