def inside_cookbook(&block)
      cookbook_path = File.join(Strainer.sandbox_path.to_s, @cookbook.cookbook_name)
      Strainer.ui.debug "Changing working directory to '#{cookbook_path}'"
      original_pwd = ENV['PWD']

      ENV['PWD'] = cookbook_path
      success = Dir.chdir(cookbook_path, &block)
      ENV['PWD'] = original_pwd

      Strainer.ui.debug "Restoring working directory to '#{original_pwd}'"
      success
    end
def inside_cookbook(&block)
      cookbook_path = File.join(Strainer.sandbox_path.to_s, @cookbook.cookbook_name)
      Strainer.ui.debug "Changing working directory to '#{cookbook_path}'"
      original_pwd = ENV['PWD']

      ENV['PWD'] = cookbook_path
      success = Dir.chdir(cookbook_path, &block)
      ENV['PWD'] = original_pwd

      Strainer.ui.debug "Restoring working directory to '#{original_pwd}'"
      success
    end
Execute a block inside the sandboxed cookbook directory.

 @yield The block to execute inside the cookbook sandbox
 @return [Boolean]
   `true` if the command exited successfully, `false` otherwise