Method: Fetchers::Git#fetch
- Defined in:
- lib/fetchers/git.rb
#fetch(dir) ⇒ Object
45 46 47 48 49 50 51 52 53 54 55 56 57 |
# File 'lib/fetchers/git.rb', line 45 def fetch(dir) @repo_directory = dir if cloned? checkout else Dir.mktmpdir do |tmpdir| checkout(tmpdir) Inspec::Log.debug("Checkout of #{resolved_ref} successful. Moving checkout to #{dir}") FileUtils.cp_r(tmpdir, @repo_directory) end end @repo_directory end |