From 6db6b7ef901adb156c32df33a2835c7ad650cf72 Mon Sep 17 00:00:00 2001 From: Andrii Klymiuk Date: Wed, 5 Oct 2022 11:03:21 +0300 Subject: [PATCH] Fix silent arg --- main.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/main.go b/main.go index 33872f7..523ce18 100644 --- a/main.go +++ b/main.go @@ -66,7 +66,13 @@ func canRunCliAgain(cmdExecuted string) bool { } func canShowWelcomeMessages() bool { - return os.Args[len(os.Args)-1] != "--silent" + for _, arg := range os.Args { + fmt.Println(arg) + if arg == "--silent" { + return false + } + } + return true } func showWelcomeMessage() {