mirror of
https://github.com/tomgi/git_stats.git
synced 2025-01-03 11:12:11 +01:00
fixed encoding problem with some repositories
This commit is contained in:
parent
a801a2f02b
commit
116cc5a8f4
1 changed files with 5 additions and 0 deletions
|
@ -3,6 +3,11 @@ module GitStats
|
||||||
module GitData
|
module GitData
|
||||||
class CommandRunner
|
class CommandRunner
|
||||||
def run(path, command)
|
def run(path, command)
|
||||||
|
execute(command, path).encode!('UTF-8', 'UTF-8', :invalid => :replace)
|
||||||
|
end
|
||||||
|
|
||||||
|
private
|
||||||
|
def execute(command, path)
|
||||||
Dir.chdir(path) { %x[#{command}] }
|
Dir.chdir(path) { %x[#{command}] }
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue