From 27d5291f2befc23bc75f0ae338c8dd69793a6e5f Mon Sep 17 00:00:00 2001 From: lixiangwuxian Date: Sat, 29 Mar 2025 15:17:33 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9=20fetchself=20?= =?UTF-8?q?=E8=A7=A3=E6=9E=90=E5=99=A8=E4=B8=AD=E7=9A=84=E5=91=BD=E4=BB=A4?= =?UTF-8?q?=E6=89=A7=E8=A1=8C=E9=80=BB=E8=BE=91=EF=BC=8C=E7=AE=80=E5=8C=96?= =?UTF-8?q?=E5=91=BD=E4=BB=A4=E6=9E=84=E5=BB=BA=E6=96=B9=E5=BC=8F=E4=BB=A5?= =?UTF-8?q?=E6=8F=90=E9=AB=98=E4=BB=A3=E7=A0=81=E5=8F=AF=E8=AF=BB=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- handler/fetchself/fetch.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/handler/fetchself/fetch.go b/handler/fetchself/fetch.go index e46b54d..7dfacc7 100644 --- a/handler/fetchself/fetch.go +++ b/handler/fetchself/fetch.go @@ -147,8 +147,7 @@ type Parser interface { type fastdfetchParser struct{} func (p *fastdfetchParser) Parse(cmd string) (SystemInfo, error) { - fullCmd := fmt.Sprintf("%s --color_blocks off", cmd) - output, err := exec.Command(fullCmd).Output() + output, err := exec.Command(cmd).Output() if err != nil { return SystemInfo{}, err } @@ -223,8 +222,7 @@ func (p *fastdfetchParser) Parse(cmd string) (SystemInfo, error) { type neofetchParser struct{} func (p *neofetchParser) Parse(cmd string) (SystemInfo, error) { - fullCmd := fmt.Sprintf("%s --color_blocks off", cmd) - output, err := exec.Command(fullCmd).Output() + output, err := exec.Command(cmd, "--color_blocks", "off").Output() if err != nil { return SystemInfo{}, err }