Skip to content

Commit

Permalink
Use proper quotes and escaping in data reset
Browse files Browse the repository at this point in the history
  • Loading branch information
wbclark committed Sep 4, 2020
1 parent 3dcd45b commit 4548bcc
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions hooks/pre/10-reset_data.rb
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def reset_candlepin

def empty_mongo(config)
if config[:ssl]
ssl = "--ssl"
ssl = '--ssl'
if config[:ca_path]
ca_cert = "--sslCAFile #{config[:ca_path]}"
client_cert = "--sslPEMKeyFile #{config[:ssl_certfile]}" if config[:ssl_certfile]
Expand Down Expand Up @@ -105,11 +105,11 @@ def empty_database!(config)

def clear_pulpcore_content(content_dir)
if File.directory?(content_dir)
logging.debug "Removing Pulpcore content from \'#{content_dir}\'"
logging.debug "Removing Pulpcore content from '#{content_dir}'"
FileUtils.rm_rf(content_dir)
logger.info "Pulpcore content successfully removed from \'#{content_dir}\'"
logger.info "Pulpcore content successfully removed from '#{content_dir}'"
else
logger.warn "Pulpcore content directory not present at \'#{content_dir}\'"
logger.warn "Pulpcore content directory not present at '#{content_dir}'"
end
end

Expand Down

0 comments on commit 4548bcc

Please sign in to comment.