From 22863e3497245b6584ec75e89151e8838b5768fa Mon Sep 17 00:00:00 2001 From: Ewoud Kohl van Wijngaarden Date: Thu, 5 Nov 2020 11:02:43 +0100 Subject: [PATCH] Always read plugin manifest as UTF-8 The manifest can contain UTF-8 data and if no LANG is set (like in minimal environments), this causes the read to fail. This forces it to read the file using UTF-8 encoding. --- lib/puppet/jenkins/plugins.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/puppet/jenkins/plugins.rb b/lib/puppet/jenkins/plugins.rb index 3d8f87714..760ad219b 100644 --- a/lib/puppet/jenkins/plugins.rb +++ b/lib/puppet/jenkins/plugins.rb @@ -54,7 +54,7 @@ def self.available manifest = File.join(plugin_dir, 'META-INF', 'MANIFEST.MF') begin - manifest = manifest_data(File.read(manifest)) + manifest = manifest_data(File.read(manifest, encoding: 'UTF-8')) plugins[plugin] = manifest if manifest rescue StandardError # Nothing really to do about it, failing means no version which will