From 001def6474e0a90c815ddc6c298bfad950d96d9c Mon Sep 17 00:00:00 2001 From: Christopher Williams Date: Thu, 17 Nov 2016 14:47:04 -0500 Subject: [PATCH] Always quote the sevenzip_binary path and path to xcopy. Signed-off-by: Christopher Williams --- libraries/sevenzip_command_builder.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/sevenzip_command_builder.rb b/libraries/sevenzip_command_builder.rb index 8d8a9934..23b2d9ee 100644 --- a/libraries/sevenzip_command_builder.rb +++ b/libraries/sevenzip_command_builder.rb @@ -40,11 +40,11 @@ def sevenzip_command currdir += "\\%#{count}" end - cmd += "#{ENV.fetch('SystemRoot')}\\System32\\xcopy \"#{currdir}\" \"#{resource.home_dir}\" /s /e" + cmd += "\"#{ENV.fetch('SystemRoot')}\\System32\\xcopy\" \"#{currdir}\" \"#{resource.home_dir}\" /s /e" end def sevenzip_binary - @tar_binary ||= (node['ark']['sevenzip_binary'] || sevenzip_path_from_registry) + @tar_binary ||= "\"#{(node['ark']['sevenzip_binary'] || sevenzip_path_from_registry)}\"" end def sevenzip_path_from_registry