From cfd47815cf17fe9c9a22f89e376920d310a43f87 Mon Sep 17 00:00:00 2001 From: paulyufan2 Date: Thu, 12 Oct 2023 17:18:52 -0400 Subject: [PATCH] fix comments --- platform/os_linux.go | 3 +-- platform/os_windows.go | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/platform/os_linux.go b/platform/os_linux.go index 19f6127bd5..444b32071e 100644 --- a/platform/os_linux.go +++ b/platform/os_linux.go @@ -137,9 +137,8 @@ func (p *execClient) ExecutePowershellCommand(_ string) (string, error) { } func (p *execClient) KillProcessByName(processName string) error { - newExecClient := NewExecClient(p.logger) cmd := fmt.Sprintf("pkill -f %v", processName) - _, err := newExecClient.ExecuteCommand(cmd) + _, err := p.ExecuteCommand(cmd) return err } diff --git a/platform/os_windows.go b/platform/os_windows.go index 67ca552598..6fe2d2ab19 100644 --- a/platform/os_windows.go +++ b/platform/os_windows.go @@ -158,9 +158,8 @@ func (p *execClient) ClearNetworkConfiguration() (bool, error) { } func (p *execClient) KillProcessByName(processName string) error { - newExecClient := NewExecClient(p.logger) cmd := fmt.Sprintf("taskkill /IM %v /F", processName) - _, err := newExecClient.ExecuteCommand(cmd) + _, err := p.ExecuteCommand(cmd) return err // nolint }