From e260be89d5092e191b82342b47b6789c03af3216 Mon Sep 17 00:00:00 2001 From: Osmany Montero Date: Wed, 26 Feb 2025 14:57:00 +0200 Subject: [PATCH] Refactor RunCommand to separate command name and arguments Updated the `RunCommand` function to accept the command name and arguments as separate parameters. This improves clarity and aligns with the standard `exec.Command` usage pattern. --- correlation/utils/os.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/correlation/utils/os.go b/correlation/utils/os.go index 002a8cbfa..de9dc29cb 100644 --- a/correlation/utils/os.go +++ b/correlation/utils/os.go @@ -5,8 +5,8 @@ import ( "os/exec" ) -func RunCommand(command ...string) error { - cmd := exec.Command(command[0], command[1:]...) +func RunCommand(name string, args ...string) error { + cmd := exec.Command(name, args...) cmd.Stderr = os.Stderr cmd.Stdout = os.Stdout