Skip to content

Commit

Permalink
Merge pull request #162 from mikkergimenez/dont_copy_r10k_modules_folder
Browse files Browse the repository at this point in the history
Skip copy of r10k modules directory.
  • Loading branch information
dylanratcliffe authored Mar 15, 2018
2 parents 7dbfabd + 03fc49f commit e47dba3
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions lib/onceover/testconfig.rb
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,16 @@ def deploy_local(repo = Onceover::Controlrepo.new, opts = {})
excluded_dirs << Pathname.new("#{repo.root}/.onceover")
excluded_dirs << Pathname.new(ENV['GEM_HOME']) if ENV['GEM_HOME']

#
# A Local modules directory likely means that the user installed r10k folders into their local control repo
# This conflicts with the step where onceover installs r10k after copying the control repo to the temporary
# .onceover directory. The following skips copying the modules folder, to not later cause an error.
#
if File.directory?("#{repo.root}/modules")
logger.warn "Found modules directory in your controlrepo, skipping the copy of this directory. If you installed modules locally using r10k, this warning is normal, if you have created modules in a local modules directory, onceover does not support testing these files, please rename this directory to conform with Puppet best practices, as this folder will conflict with Puppet's native installation of modules."
end
excluded_dirs << Pathname.new("#{repo.root}/modules")

controlrepo_files = get_children_recursive(Pathname.new(repo.root))

# Exclude the files that should be skipped
Expand Down

0 comments on commit e47dba3

Please sign in to comment.