Skip to content
This repository was archived by the owner on Jan 24, 2022. It is now read-only.

Commit 2ac9d06

Browse files
author
Jonathan Claudius
authored
Merge pull request #478 from mozilla/fix_no_method
Fix TypeError when stdout is nil
2 parents a4104d8 + 79660cc commit 2ac9d06

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/ssh_scan/scan_engine.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,9 @@ def scan_target(socket, opts)
126126
cmd = ['ssh-keyscan', '-t', 'rsa,dsa', '-p', port.to_s, target].join(" ")
127127

128128
Utils::Subprocess.new(cmd) do |stdout, stderr, thread|
129-
output += stdout
129+
if stdout
130+
output += stdout
131+
end
130132
end
131133

132134
host_keys = output.split

0 commit comments

Comments
 (0)