Commit da347d1bb45ad3b08b2aa0b40041c67dac0df3c5

Authored by Jacob Vosmaer
1 parent 4917dc64

Apply the locale encoding to `tar --version`

Fixes a bug with non-UTF8 locales introduced by
2b816075dc71dfe8f6f9e5349fdff7f03ad9dad0.
Showing 2 changed files with 2 additions and 1 deletions   Show diff stats
@@ -10,6 +10,7 @@ v 6.9.0 @@ -10,6 +10,7 @@ v 6.9.0
10 - Stop refreshing comments when the tab is hidden 10 - Stop refreshing comments when the tab is hidden
11 - Improve issue and merge request mobile UI (Drew Blessing) 11 - Improve issue and merge request mobile UI (Drew Blessing)
12 - Document how to convert a backup to PostgreSQL 12 - Document how to convert a backup to PostgreSQL
  13 + - Fix locale bug in backup manager
13 14
14 v 6.8.0 15 v 6.8.0
15 - Ability to at mention users that are participating in issue and merge req. discussion 16 - Ability to at mention users that are participating in issue and merge req. discussion
lib/backup/manager.rb
@@ -101,7 +101,7 @@ module Backup @@ -101,7 +101,7 @@ module Backup
101 101
102 def tar_version 102 def tar_version
103 tar_version, _ = Gitlab::Popen.popen(%W(tar --version)) 103 tar_version, _ = Gitlab::Popen.popen(%W(tar --version))
104 - tar_version.split("\n").first 104 + tar_version.force_encoding('locale').split("\n").first
105 end 105 end
106 end 106 end
107 end 107 end