mirror of
https://github.com/tomgi/git_stats.git
synced 2024-09-29 20:21:29 +02:00
fixed encoding problem with some repositories
This commit is contained in:
parent
a801a2f02b
commit
116cc5a8f4
@ -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 New Issue
Block a user