Skip to content

Commit dc52ddb

Browse files
committed
Enhance SSH command result handling and debug output
1 parent b559609 commit dc52ddb

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/util/ssh.cr

+7-1
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,19 @@ class Util::SSH
2828
end
2929

3030
result ||= ""
31+
result = result.not_nil!.strip.gsub(/[\r\n]/, "")
3132

3233
if ENV.fetch("DEBUG", "false") == "true"
3334
puts "SSH command result: ===#{result}==="
3435
puts "SSH command expected: ===#{expected_result}==="
36+
puts "Matching?: ===#{ result == expected_result }==="
3537
end
3638

37-
break result if result.not_nil!.strip.gsub(/[\r\n]/, "") == expected_result
39+
if result == expected_result
40+
break result
41+
else
42+
log_line "Waiting for instance #{instance.name} to be ready...", log_prefix: "Instance #{instance.name}"
43+
end
3844
end
3945

4046
result

0 commit comments

Comments
 (0)