Sha256: 18001a00c8c900d7d1f2ef5651ebb6a83b1622737b566e632d24d9e299c8ca9b
Contents?: true
Size: 1.04 KB
Versions: 27
Compression:
Stored size: 1.04 KB
Contents
# frozen_string_literal: true # tau info status ssh module InfoStatusSSH # Backend method for info status ssh. # @return [Boolean] is ssh available? # rubocop:disable Metrics/MethodLength def info_status_ssh log.debug 'Check ssh status' ssh_auth_sock = ENV['SSH_AUTH_SOCK'] gpg_ssh_socket = _info_status_ssh_socket_path.chomp unless ssh_auth_sock == gpg_ssh_socket log.error 'ssh does not use gpg ssh socket' return false end unless _file_exists? gpg_ssh_socket log.error 'gpg ssh socket is not available' return false end unless _info_status_ssh_keys log.error 'ssh keys are not available' return false end log.debug 'ssh is available' true end # rubocop:enable Metrics/MethodLength private # Get ssh socket path def _info_status_ssh_socket_path run config.active['cmd_info_status_ssh_socket'] end # Check ssh keys def _info_status_ssh_keys status_keys = try config.active['cmd_info_status_ssh_keys'] status_keys.exitstatus.zero? end end
Version data entries
27 entries across 27 versions & 1 rubygems