133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
|
# File 'lib/pkgr/cli.rb', line 133
def package(tarball)
Pkgr.level = Logger::INFO if options[:verbose]
Pkgr.level = Logger::DEBUG if options[:debug]
Pkgr::Buildpack.buildpacks_cache_dir = options[:buildpacks_cache_dir] if options[:buildpacks_cache_dir]
packager = Dispatcher.new(tarball, options)
packager.call
rescue => e
Pkgr.debug "#{e.class.name} : #{e.message}"
e.backtrace.each{|line| Pkgr.debug line}
puts " ! ERROR: #{e.message}"
exit 1
rescue Exception => e
Pkgr.debug "#{e.class.name} : #{e.message}"
e.backtrace.each{|line| Pkgr.debug line}
puts " ! SYSTEM ERROR: #{e.class.name} : #{e.message}"
raise e
end
|