lib/berkshelf/locations/git.rb in berkshelf-3.1.5 vs lib/berkshelf/locations/git.rb in berkshelf-3.2.0

- old
+ new

@@ -25,11 +25,11 @@ @rev_parse = options[:ref] || options[:branch] || options[:tag] || 'master' end # @see BaseLoation#installed? def installed? - revision && install_path.exist? + !!(revision && install_path.exist?) end # Install this git cookbook into the cookbook store. This method leverages # a cached git copy and a scratch directory to prevent bad cookbooks from # making their way into the cookbook store. @@ -69,10 +69,10 @@ # If we got this far, we should copy FileUtils.rm_rf(install_path) if install_path.exist? FileUtils.cp_r(scratch_path, install_path) # Remove the git history - FileUtils.rm_rf(File.join(install_path, '.git')) + FileUtils.rm_rf(File.join(install_path, '.git')) install_path.chmod(0777 & ~File.umask) ensure # Ensure the scratch directory is cleaned up FileUtils.rm_rf(scratch_path)