Skip to content

Commit

Permalink
Always read plugin manifest as UTF-8
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
ekohl committed Nov 5, 2020
1 parent 15ffa71 commit 22863e3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/puppet/jenkins/plugins.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 22863e3

Please sign in to comment.