Skip to content
This repository was archived by the owner on Jan 15, 2024. It is now read-only.

Commit

Permalink
Add more debugging to the sandbox
Browse files Browse the repository at this point in the history
  • Loading branch information
sethvargo committed May 14, 2013
1 parent 6de5390 commit 3b21369
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/strainer/sandbox.rb
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ def place_knife_rb

# Copy all the cookbooks provided in {#initialize} to the isolated sandbox location
def copy_cookbooks
Strainer.ui.debug "Sandbox#copy_cookbooks"
cookbooks_and_dependencies.each do |cookbook|
sandbox_path = SANDBOX.join(cookbook.cookbook_name)

Expand All @@ -112,6 +113,7 @@ def copy_cookbooks
# @return [Array<Berkshelf::CachedCookbook>]
# the array of cached cookbooks
def load_cookbooks(cookbook_names)
Strainer.ui.debug "Sandbox#load_cookbooks(#{cookbook_names.inspect})"
cookbook_names.collect{ |cookbook_name| load_cookbook(cookbook_name) }
end

Expand All @@ -124,7 +126,7 @@ def load_cookbooks(cookbook_names)
# @raise [Strainer::Error::CookbookNotFound]
# when the cookbook was not found in any of the sources
def load_cookbook(cookbook_name)
Strainer.ui.debug "Sandbox#load_cookbook('#{cookbook_name}')"
Strainer.ui.debug "Sandbox#load_cookbook('#{cookbook_name.inspect}')"
cookbook_path = cookbooks_paths.find { |path| path.join(cookbook_name).exist? }

cookbook = if cookbook_path
Expand Down

0 comments on commit 3b21369

Please sign in to comment.