From 5d58876f07cd5d9bb28ed2493c4acdd40a73bc55 Mon Sep 17 00:00:00 2001 From: Martin Schurz Date: Wed, 29 Oct 2025 10:05:11 +0100 Subject: [PATCH] Consistent use of regex for splitting find results Signed-off-by: Martin Schurz --- controls/os_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/controls/os_spec.rb b/controls/os_spec.rb index f6902ed..48dd32f 100644 --- a/controls/os_spec.rb +++ b/controls/os_spec.rb @@ -276,7 +276,7 @@ it { should be_directory } end - loaded_files = command("find #{cpuvulndir} -type f -maxdepth 1").stdout.split(/\n/).map(&:strip).find_all { |vulnfiles| !vulnfiles.empty? } + loaded_files = command("find #{cpuvulndir} -type f -maxdepth 1").stdout.split(/\r?\n/).map(&:strip).find_all { |vulnfiles| !vulnfiles.empty? } loaded_files.each do |vulnfile| describe file(vulnfile) do