Skip to content

Commit 8bd8631

Browse files
committed
Wrap arguments in quotes when preparing submission with rust langs
1 parent 64ad553 commit 8bd8631

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

lib/rust_langs_cli_executor.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@
66

77
module RustLangsCliExecutor
88
def self.prepare_submission(clone_path, output_path, submission_path, extra_params = {}, config = {})
9-
command = "#{self.langs_executable_path}/current prepare-submission --clone-path #{clone_path} --output-path #{output_path} --submission-path #{submission_path}"
10-
command = command + " --top-level-dir-name #{config[:toplevel_dir_name]}" if !!config[:toplevel_dir_name]
11-
command = command + " --stub-zip-path #{config[:tests_from_stub]}" if !!config[:tests_from_stub]
12-
command = command + " --output-format #{config[:format]}" if !!config[:format]
9+
command = "#{self.langs_executable_path}/current prepare-submission --clone-path '#{clone_path}' --output-path '#{output_path}' --submission-path '#{submission_path}'"
10+
command = command + " --top-level-dir-name '#{config[:toplevel_dir_name]}'" if !!config[:toplevel_dir_name]
11+
command = command + " --stub-zip-path '#{config[:tests_from_stub]}'" if !!config[:tests_from_stub]
12+
command = command + " --output-format '#{config[:format]}'" if !!config[:format]
1313
extra_params.each do |k, v|
14-
command = command + " --tmc-param #{k}=#{v}" unless v.nil?
14+
command = command + " --tmc-param '#{k}=#{v}'" unless v.nil?
1515
end
1616

1717
command_output = `#{command}`

0 commit comments

Comments
 (0)