summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormo khan <mo@mokhan.ca>2021-12-21 17:51:17 -0700
committermo khan <mo@mokhan.ca>2021-12-21 17:51:17 -0700
commitbd042abf78e262e6841bcc4cc6236872198a50e1 (patch)
tree19865ffaf22ffb4fed05777391c82ac4a5464ce7
parentf12b7a8cec5db6b00b22159df397158466f2b764 (diff)
fix: record error and move on to the next dependencyv0.1.9
-rw-r--r--Gemfile.lock2
-rw-r--r--lib/dependabot.rb2
-rw-r--r--lib/dependabot/cli/scan.rb5
-rw-r--r--lib/dependabot/version.rb2
4 files changed, 7 insertions, 4 deletions
diff --git a/Gemfile.lock b/Gemfile.lock
index 8a536a9..baf1328 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
- dependanot (0.1.8)
+ dependanot (0.1.9)
bundler (~> 2.0)
octokit (~> 4.0)
rugged (~> 1.2)
diff --git a/lib/dependabot.rb b/lib/dependabot.rb
index 528a997..ac392af 100644
--- a/lib/dependabot.rb
+++ b/lib/dependabot.rb
@@ -17,7 +17,7 @@ module Dependabot
class Error < StandardError; end
def self.logger
- @logger ||= Logger.new($stderr, level: ENV.fetch("LOG_LEVEL", Logger::WARN)).tap do |x|
+ @logger ||= Logger.new($stderr, level: ENV.fetch("LOG_LEVEL", Logger::INFO)).tap do |x|
x.formatter = proc do |_severity, _datetime, _progname, message|
"[v#{VERSION}] #{message}\n"
end
diff --git a/lib/dependabot/cli/scan.rb b/lib/dependabot/cli/scan.rb
index b67331b..f03cf95 100644
--- a/lib/dependabot/cli/scan.rb
+++ b/lib/dependabot/cli/scan.rb
@@ -31,8 +31,11 @@ module Dependabot
end
def update(dependency)
- ::Dependabot.logger.debug("Updating #{dependency.name}…")
+ ::Dependabot.logger.info("Updating #{dependency.name}…")
::Dependabot::Publish.new(dependency).update!(push: options[:push])
+ rescue StandardError => boom
+ Dependabot.logger.error(boom)
+ boom.backtrace.each { |x| Dependabot.logger.debug(x) }
end
def match?(dependency)
diff --git a/lib/dependabot/version.rb b/lib/dependabot/version.rb
index 9f352bd..0f9b219 100644
--- a/lib/dependabot/version.rb
+++ b/lib/dependabot/version.rb
@@ -1,5 +1,5 @@
# frozen_string_literal: true
module Dependabot
- VERSION = "0.1.8"
+ VERSION = "0.1.9"
end