From 8b0c80dff0ea6ba4430a9a4fbb00163f602e8e9b Mon Sep 17 00:00:00 2001 From: ryot4 Date: Sat, 4 Jul 2026 21:03:52 +0900 Subject: [PATCH] host_inventory/ohai: Suppress error messages to avoid parse error ohai prints errors to stderr, but when request_pty is true, they are merged into stdout and causes parse error. --- lib/specinfra/host_inventory/ohai.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/specinfra/host_inventory/ohai.rb b/lib/specinfra/host_inventory/ohai.rb index 289e0bc15..54c1e15f2 100644 --- a/lib/specinfra/host_inventory/ohai.rb +++ b/lib/specinfra/host_inventory/ohai.rb @@ -9,7 +9,7 @@ def get end begin - ret = backend.run_command('ohai --log_level error') + ret = backend.run_command('ohai --log_level error 2>/dev/null') rescue StandardError nil end