From 9e58b613df6a08d439a244eeefcdff6ba93d92be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=80=97=E5=AD=90?= Date: Mon, 23 Oct 2023 21:54:22 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BC=98=E5=8C=96=20shell=20=E6=89=A7?= =?UTF-8?q?=E8=A1=8C=E9=94=99=E8=AF=AF=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkg/tools/system.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkg/tools/system.go b/pkg/tools/system.go index 80d47e74..679d658c 100644 --- a/pkg/tools/system.go +++ b/pkg/tools/system.go @@ -1,6 +1,7 @@ package tools import ( + "fmt" "os" "os/exec" "path/filepath" @@ -54,6 +55,8 @@ func Exec(shell string) string { output, err := cmd.CombinedOutput() if err != nil { if support.Env == support.EnvTest { + fmt.Println(string(output)) + fmt.Println(err.Error()) panic(err) } else { facades.Log().Errorf("[面板][Helpers] 执行命令 %s 失败: %s", shell, err.Error()) @@ -71,6 +74,7 @@ func ExecAsync(shell string) { err := cmd.Start() if err != nil { if support.Env == support.EnvTest { + fmt.Println(err.Error()) panic(err) } else { facades.Log().Errorf("[面板][Helpers] 执行命令 %s 失败: %s", shell, err.Error()) @@ -81,6 +85,7 @@ func ExecAsync(shell string) { err := cmd.Wait() if err != nil { if support.Env == support.EnvTest { + fmt.Println(err.Error()) panic(err) } else { facades.Log().Errorf("[面板][Helpers] 执行命令 %s 失败: %s", shell, err.Error())