Skip to content

Commit 140c365

Browse files
committed
removed \n and %b combination for tool detection
1 parent c06a4a2 commit 140c365

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

pkg-new/preflights/host-preflight.yaml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -261,17 +261,15 @@ spec:
261261
- -c
262262
- |
263263
pkgs="sdcss-kmod sdcss sdcss-scripts"
264-
installed=""
265264
if command -v dpkg >/dev/null 2>&1; then
266265
for p in $pkgs; do
267-
dpkg -l "$p" >/dev/null 2>&1 && installed="$installed$p\n"
266+
dpkg -l "$p" >/dev/null 2>&1 && printf '%s\n' "$p"
268267
done
269268
elif command -v rpm >/dev/null 2>&1; then
270269
for p in $pkgs; do
271-
rpm -q "$p" >/dev/null 2>&1 && installed="$installed$p\n"
270+
rpm -q "$p" >/dev/null 2>&1 && printf '%s\n' "$p"
272271
done
273272
fi
274-
printf "%b" "$installed" | sed '/^$/d'
275273
analyzers:
276274
- cpu:
277275
checkName: CPU

0 commit comments

Comments
 (0)