mirror of
https://github.com/inspec/inspec
synced 2024-11-10 15:14:23 +00:00
inspec-compliance: url_encode profile names
This commit is contained in:
parent
62cadd0aab
commit
be93f25e6e
1 changed files with 3 additions and 1 deletions
|
@ -3,6 +3,7 @@
|
|||
# author: Dominik Richter
|
||||
|
||||
require 'thor'
|
||||
require 'erb'
|
||||
|
||||
module Compliance
|
||||
class ComplianceCLI < Inspec::BaseCLI # rubocop:disable Metrics/ClassLength
|
||||
|
@ -106,9 +107,10 @@ module Compliance
|
|||
end
|
||||
|
||||
puts "Start upload to #{owner}/#{profile_name}"
|
||||
pname = ERB::Util.url_encode(profile_name)
|
||||
|
||||
# upload the tar to Chef Compliance
|
||||
url = "#{config['server']}/owners/#{owner}/compliance/#{profile_name}/tar"
|
||||
url = "#{config['server']}/owners/#{owner}/compliance/#{pname}/tar"
|
||||
|
||||
puts "Uploading to #{url}"
|
||||
success, msg = Compliance::API.post_file(url, config['token'], '', archive_path, config['insecure'])
|
||||
|
|
Loading…
Reference in a new issue