From def76272e4be724c7782a66938df20c1b332ce72 Mon Sep 17 00:00:00 2001 From: Oleksii Filonenko Date: Mon, 14 May 2018 21:35:09 +0300 Subject: [PATCH] Delete non-ASCII characters from init system output (#9) --- lib/panda_motd/components/service_status.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/panda_motd/components/service_status.rb b/lib/panda_motd/components/service_status.rb index 2f798d9..53a1304 100644 --- a/lib/panda_motd/components/service_status.rb +++ b/lib/panda_motd/components/service_status.rb @@ -38,7 +38,7 @@ def to_s def parse_services(services) results = {} - cmd_result = `systemctl | grep '\.service'` + cmd_result = `systemctl | grep '\.service'`.delete("^\u{0000}-\u{007F}") if cmd_result.empty? @errors << ComponentError.new(self, 'Unable to parse systemctl output')