Skip to content

Commit 345d79e

Browse files
authored
Fix the CPU data query to return a string (#6335)
Return a string here so we get cleaner output Signed-off-by: Tim Smith <tsmith84@gmail.com>
1 parent 4e45d97 commit 345d79e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

content/mondoo-linux-inventory.mql.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,9 +112,9 @@ packs:
112112
filters: mondoo.capabilities.contains("run-command")
113113
mql: |
114114
if (asset.arch == /aarch/) {
115-
command("lscpu").stdout.lines.where(_.contains("Model name")).first().split(":").last().trim()
115+
return command("lscpu").stdout.lines.where(_.contains("Model name")).first().split(":").last().trim()
116116
} else {
117-
file("/proc/cpuinfo").content.lines.where(_.contains("model name")).first().split(":").last().trim()
117+
return file("/proc/cpuinfo").content.lines.where(_.contains("model name")).first().split(":").last().trim()
118118
}
119119
- uid: mondoo-linux-root-volume
120120
title: Root volume size and filesystem type

0 commit comments

Comments
 (0)