From 13c41e366ef7a079b665543aca58c94c8f15c49a Mon Sep 17 00:00:00 2001 From: Markus Doits Date: Mon, 25 Jul 2016 16:55:42 +0200 Subject: [PATCH] escape file path before passing it to shell --- lib/pronto/eslint.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/pronto/eslint.rb b/lib/pronto/eslint.rb index fa4261d..d57a408 100644 --- a/lib/pronto/eslint.rb +++ b/lib/pronto/eslint.rb @@ -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 = -- 2.41.0