From 7a6f8155970b464e5c53bcdd0bf1352a2a13d65b Mon Sep 17 00:00:00 2001 From: shine <1042864399@qq.com> Date: Sat, 12 Oct 2024 15:44:16 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=AF=E6=8C=81=E4=BA=86=20html=20=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B=E5=B7=A5=E5=85=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- views/createView/createExecFile.go | 2 +- views/showView/execFile.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/views/createView/createExecFile.go b/views/createView/createExecFile.go index b9de93a..089d978 100644 --- a/views/createView/createExecFile.go +++ b/views/createView/createExecFile.go @@ -67,7 +67,7 @@ func CreateExecFile(w fyne.Window) fyne.CanvasObject { dialog.ShowInformation("测试失败", "未填写执行命令", w) return } - ex := exec.Command(info.Cmd) + ex := exec.Command("cmd", "/c", "start", info.Cmd) ex.Dir = filepath.Join(chooseDir, info.Pwd) if err := ex.Start(); err != nil { dialog.ShowInformation("测试失败", err.Error(), w) diff --git a/views/showView/execFile.go b/views/showView/execFile.go index dfdb927..91baa37 100644 --- a/views/showView/execFile.go +++ b/views/showView/execFile.go @@ -34,7 +34,7 @@ func runExecFile(data *models.BaseCard, w fyne.Window) { dialog.ShowInformation("测试失败", err.Error(), w) return } - ex := exec.Command(info.Cmd) + ex := exec.Command("cmd", "/c", "start", info.Cmd) ex.Dir = filepath.Join(cfg.T.CardDir, data.UUID, info.Pwd) if err := ex.Start(); err != nil { dialog.ShowInformation("测试失败", err.Error(), w)