mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-10-29 09:40:21 +00:00
Ditching IO
This commit is contained in:
2
Rakefile
2
Rakefile
@@ -86,7 +86,7 @@ namespace :benchmark do
|
||||
files.each do |file|
|
||||
next unless File.file?(file)
|
||||
puts " #{file}"
|
||||
result = IO::popen("bundle exec linguist #{Shellwords.escape(file)} --simple").read
|
||||
result = %x{bundle exec linguist #{Shellwords.escape(file)} --simple}
|
||||
filename = File.basename(file)
|
||||
if result.chomp.empty? # No results
|
||||
results[lang][filename] = "No language"
|
||||
|
||||
Reference in New Issue
Block a user