From c169cf9ad6cab114965160f651048466d26c6bcb Mon Sep 17 00:00:00 2001 From: harveyshao Date: Tue, 11 Jan 2022 16:14:48 +0800 Subject: [PATCH] opt some --- init.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/init.go b/init.go index 01f4a12d..a6ce57c7 100644 --- a/init.go +++ b/init.go @@ -98,10 +98,10 @@ var Pulse = &Message{ } func Run(arg ...string) string { - if os.Getenv("ctx_arg") != "" { + if arg = append(arg, os.Args[1:]...); os.Getenv("ctx_arg") != "" { arg = append(arg, kit.Split(os.Getenv("ctx_arg"))...) } - if arg = append(arg, os.Args[1:]...); len(arg) == 0 { + if len(arg) == 0 { arg = append(arg, HELP) }