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>
This commit is contained in:
David Esparza 2023-10-27 11:09:08 -06:00
parent c42a2f2eda
commit c232869af9
No known key found for this signature in database
GPG Key ID: EABE0B1A98CC3B7A

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