Skip to content

Ignore :non_interactive set by net-ssh 8.1+ in test_ssh_option_merge - #586

Open
ssaunier wants to merge 2 commits into
capistrano:masterfrom
ssaunier:fix-ssh-option-merge-non-interactive
Open

ssaunier wants to merge 2 commits into
capistrano:masterfrom
ssaunier:fix-ssh-option-merge-non-interactive

Conversation

@ssaunier

Copy link
Copy Markdown

Since net-ssh 8.1.0, Net::SSH.assign_defaults sets :non_interactive when no password prompt can be shown, which is the case whenever stdin isn't a TTY (as on CI):

unless options[:password_prompt] || options[:prompt_without_tty] || Prompt.can_ask?
  options[:non_interactive] = true
end

test_ssh_option_merge compares the exact list of SSH option keys, so it now fails with the latest net-ssh:

-[:forward_agent, :keepalive, :known_hosts, :logger, :password_prompt]
+[:forward_agent, :keepalive, :known_hosts, :logger, :non_interactive, :password_prompt]

The test is about how SSHKit merges its own options with the host's, so this ignores the key net-ssh adds. It still passes with older net-ssh versions (e.g. on Ruby 2.5), which don't set it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant