lib/gemsmith/tools/pusher.rb in gemsmith-21.6.0 vs lib/gemsmith/tools/pusher.rb in gemsmith-21.9.0

- old
+ new

@@ -26,16 +26,16 @@ attr_reader :command # :reek:TooManyStatements def one_time_password - return [] if check_yubikey.failure? + return Core::EMPTY_ARRAY if check_yubikey.failure? executor.capture3(check_yubikey.success, "oath", "accounts", "code", "--single", "RubyGems") .then { |stdout, _stderr, status| status.success? ? ["--otp", stdout.chomp] : [] } rescue Errno::ENOENT => error logger.debug { "Unable to obtain YubiKey One-Time Password. #{error}." } - [] + Core::EMPTY_ARRAY end def check_yubikey executor.capture3("command", "-v", "ykman") .then do |stdout, stderr, status|