Skip to content

Commit a013939

Browse files
authored
Merge pull request #2561 from tvpartytonight/PA-4994
(PA-4994) Check for valid encoding from spawned process
2 parents 5735566 + b8d2e45 commit a013939

File tree

1 file changed

+1
-0
lines changed
  • lib/facter/custom_facts/core/execution

1 file changed

+1
-0
lines changed

lib/facter/custom_facts/core/execution/base.rb

+1
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ def execute_command(command, on_fail = nil, logger = nil, timeout = nil)
106106
raise Facter::Core::Execution::ExecutionFailure.new, message
107107
end
108108

109+
out.force_encoding(Encoding.default_external) unless out.valid_encoding?
109110
[out.strip, stderr]
110111
end
111112

0 commit comments

Comments
 (0)