Skip to content

Commit

Permalink
Properly escape paths
Browse files Browse the repository at this point in the history
If the expanded path includes a space the puppet module tool would
interpret it as additional arguments. This change adds quotes around
the paths so that they're interpreted as single arguments.
  • Loading branch information
Josh Samuelson committed May 31, 2017
1 parent 8443c1e commit 261f535
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions lib/puppetlabs_spec_helper/rake_tasks.rb
Original file line number Diff line number Diff line change
Expand Up @@ -308,11 +308,11 @@ def max_thread_limit
command = "puppet module install" + ref + flags + \
" --ignore-dependencies" \
" --force" \
" --module_working_dir #{working_dir}" \
" --target-dir #{target_dir} #{remote}"
" --module_working_dir \"#{working_dir}\"" \
" --target-dir \"#{target_dir}\" \"#{remote}\""

unless system(command)
fail "Failed to install module #{remote} to #{target}"
fail "Failed to install module #{remote} to #{target_dir}"
end
end

Expand Down
2 changes: 1 addition & 1 deletion lib/puppetlabs_spec_helper/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module PuppetlabsSpecHelper
VERSION = "2.1.2"
VERSION = "2.1.3"

# compat for pre-1.2.0 users; deprecated
module Version
Expand Down

0 comments on commit 261f535

Please sign in to comment.