diff --git a/internal/utils/utils.go b/internal/utils/utils.go index 17f4422..16bfa8b 100644 --- a/internal/utils/utils.go +++ b/internal/utils/utils.go @@ -51,7 +51,7 @@ func Exec(path string, command string, args []string) string { // log.Println("Result: " + out.String()) // ... Silence ... - return strings.Trim(out.String(), " ") + return strings.Trim(out.String(), " \n") } diff --git a/internal/utils/utils_test.go b/internal/utils/utils_test.go index e68a7b2..a0670fd 100644 --- a/internal/utils/utils_test.go +++ b/internal/utils/utils_test.go @@ -14,7 +14,7 @@ func TestExec(t *testing.T) { result := Exec("/", testCommand, testArguments) if result != "Hello World" { - t.Log("Expected 'Hello World' but got ", result) + t.Log("Expected 'Hello World' but got ", "'"+result+"'") t.Fail() } }