From b3ce35d516b941010eb666280a9d5cca77bda835 Mon Sep 17 00:00:00 2001 From: zhengkunwang <31820853+zhengkunwang223@users.noreply.github.com> Date: Mon, 13 May 2024 11:34:30 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=A7=A3=E5=86=B3=E8=BF=9B=E7=A8=8B?= =?UTF-8?q?=E5=AE=88=E6=8A=A4=E5=91=BD=E4=BB=A4=E4=B8=8D=E8=83=BD=E8=BE=93?= =?UTF-8?q?=E5=85=A5=E7=A9=BA=E6=A0=BC=E7=9A=84=E9=97=AE=E9=A2=98=20(#4997?= =?UTF-8?q?)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/app/service/host_tool.go | 4 ++-- frontend/src/views/toolbox/supervisor/create/index.vue | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/app/service/host_tool.go b/backend/app/service/host_tool.go index 91198d7c8..b40bb038c 100644 --- a/backend/app/service/host_tool.go +++ b/backend/app/service/host_tool.go @@ -307,7 +307,7 @@ func (h *HostToolService) OperateSupervisorProcess(req request.SupervisorProcess if err != nil { return err } - _, _ = section.NewKey("command", req.Command) + _, _ = section.NewKey("command", strings.TrimSpace(req.Command)) _, _ = section.NewKey("directory", req.Dir) _, _ = section.NewKey("autorestart", "true") _, _ = section.NewKey("startsecs", "3") @@ -338,7 +338,7 @@ func (h *HostToolService) OperateSupervisorProcess(req request.SupervisorProcess } commandKey := section.Key("command") - commandKey.SetValue(req.Command) + commandKey.SetValue(strings.TrimSpace(req.Command)) directoryKey := section.Key("directory") directoryKey.SetValue(req.Dir) userKey := section.Key("user") diff --git a/frontend/src/views/toolbox/supervisor/create/index.vue b/frontend/src/views/toolbox/supervisor/create/index.vue index d4a2f9b30..73c576033 100644 --- a/frontend/src/views/toolbox/supervisor/create/index.vue +++ b/frontend/src/views/toolbox/supervisor/create/index.vue @@ -21,7 +21,7 @@ - +