Receives a path and load the thor file in the path. The file is evaluated
inside the sandbox to avoid namespacing conflicts.
# File lib/bundler/vendor/thor/lib/thor/util.rb, line 152
def load_thorfile(path, content = nil, debug = false)
content ||= File.binread(path)
begin
Bundler::Thor::Sandbox.class_eval(content, path)
rescue StandardError => e
$stderr.puts("WARNING: unable to load thorfile #{path.inspect}: #{e.message}")
if debug
$stderr.puts(*e.backtrace)
else
$stderr.puts(e.backtrace.first)
end
end
end