From c08ec672e7526eb4769cbf0bb7ae482c8e2cfe99 Mon Sep 17 00:00:00 2001 From: Madhusudhan Rajagopal Date: Thu, 6 Apr 2023 16:17:38 +1200 Subject: [PATCH 1/2] fix: Pass correct variable for lscpu command to work * The exec.Command() function was being passed an incorrect argument instead of the actual command to be executed --- src/core/environment.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/environment.go b/src/core/environment.go index a5e13d658..318bcade3 100644 --- a/src/core/environment.go +++ b/src/core/environment.go @@ -662,7 +662,7 @@ type execShellCommand struct { } func (e execShellCommand) Exec(cmd string, arg ...string) ([]byte, error) { - execCmd := exec.Command(name, arg...) + execCmd := exec.Command(cmd, arg...) return execCmd.Output() } From d98d7b549216b77552423b86d0555177007e0bfc Mon Sep 17 00:00:00 2001 From: Madhusudhan Rajagopal Date: Thu, 6 Apr 2023 22:17:37 +1200 Subject: [PATCH 2/2] fix: Pass correct variable for lscpu command to work * commit vendor files updated following a make deps --- .../vendor/github.com/nginx/agent/v2/src/core/environment.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/performance/vendor/github.com/nginx/agent/v2/src/core/environment.go b/test/performance/vendor/github.com/nginx/agent/v2/src/core/environment.go index a5e13d658..318bcade3 100644 --- a/test/performance/vendor/github.com/nginx/agent/v2/src/core/environment.go +++ b/test/performance/vendor/github.com/nginx/agent/v2/src/core/environment.go @@ -662,7 +662,7 @@ type execShellCommand struct { } func (e execShellCommand) Exec(cmd string, arg ...string) ([]byte, error) { - execCmd := exec.Command(name, arg...) + execCmd := exec.Command(cmd, arg...) return execCmd.Output() }