lib/bundler/alive/cli.rb in bundler-alive-0.1.5 vs lib/bundler/alive/cli.rb in bundler-alive-0.1.6
- old
+ new
@@ -36,16 +36,23 @@
end
private
def check_by_doctor
- doctor = begin
- Doctor.new(options[:gemfile_lock], options[:config], options[:ignore])
- rescue Bundler::GemfileLockNotFound
+ doctor = initialize_doctor
+
+ begin
+ doctor.diagnose
+ rescue Bundler::Alive::Client::GitlabApi::AccessTokenNotFoundError => e
+ say "\n#{e.message}", :yellow
exit 1
end
+ end
- doctor.diagnose
+ def initialize_doctor
+ Doctor.new(options[:gemfile_lock], options[:config], options[:ignore])
+ rescue Bundler::GemfileLockNotFound
+ exit 1
end
end
end
end