Skip to content

Commit e260be8

Browse files
committed
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.
1 parent 2cf8fba commit e260be8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

correlation/utils/os.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ import (
55
"os/exec"
66
)
77

8-
func RunCommand(command ...string) error {
9-
cmd := exec.Command(command[0], command[1:]...)
8+
func RunCommand(name string, args ...string) error {
9+
cmd := exec.Command(name, args...)
1010

1111
cmd.Stderr = os.Stderr
1212
cmd.Stdout = os.Stdout

0 commit comments

Comments
 (0)