metrics: removes double-quotes in checkemtrics when parsing results

This PR removes double quotes in jq output to return raw strings
as input of checkmetrics tool.

Fixes: #8331

Signed-off-by: David Esparza <david.esparza.borquez@intel.com>
(cherry picked from commit c232869af9)
This commit is contained in:
David Esparza 2023-10-27 11:09:08 -06:00 committed by Fabiano Fidêncio
parent 885fcc9aaa
commit 48cab2bfd0

View File

@ -29,7 +29,7 @@ func (c *jsonRecord) load(filepath string, metric *metrics) error {
log.Debugf(" Run jq '%v' %s", metric.CheckVar, filepath)
out, err := exec.Command("jq", metric.CheckVar, filepath).Output()
out, err := exec.Command("jq", "-r", metric.CheckVar, filepath).Output()
if err != nil {
log.Warnf("Failed to run [jq %v %v][%v]", metric.CheckVar, filepath, err)
return err