]> git.immae.eu Git - github/fretlink/pronto-hlint.git/commitdiff
escape file path before passing it to shell
authorMarkus Doits <markus.doits@stellenticket.de>
Mon, 25 Jul 2016 14:55:42 +0000 (16:55 +0200)
committerMarkus Doits <markus.doits@stellenticket.de>
Mon, 25 Jul 2016 14:55:42 +0000 (16:55 +0200)
lib/pronto/eslint.rb

index fa4261d184108e137830a7f993d4aea67e79b4cd..d57a4083c5a118599f6c3f8728deb080bc92c098 100644 (file)
@@ -16,7 +16,7 @@ module Pronto
 
       offences =
         Dir.chdir(@_repo_path) do
-          JSON.parse(`eslint #{patch.new_file_full_path} -f json`)
+          JSON.parse(`eslint #{Shellwords.escape(patch.new_file_full_path)} -f json`)
         end
 
       offences =