diff --git a/backend/app/service/host_tool.go b/backend/app/service/host_tool.go
index 91198d7c8c36..b40bb038c512 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 f60e04571210..2acfcbfe61b4 100644
--- a/frontend/src/views/toolbox/supervisor/create/index.vue
+++ b/frontend/src/views/toolbox/supervisor/create/index.vue
@@ -21,7 +21,7 @@
-
+