Skip to content

Commit

Permalink
Check protocol is SSH before connecting
Browse files Browse the repository at this point in the history
  • Loading branch information
djmb committed Sep 12, 2023
1 parent a5ebc42 commit 811066b
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions lib/kamal/cli/build.rb
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,11 @@ def verify_local_dependencies

def connect_to_remote_host(remote_host)
remote_uri = URI.parse(remote_host)
options = { user: remote_uri.user, port: remote_uri.port }.compact
on(remote_uri.host, options) do
execute "true"
if remote_uri.scheme == "ssh"
options = { user: remote_uri.user, port: remote_uri.port }.compact
on(remote_uri.host, options) do
execute "true"
end
end
end
end

0 comments on commit 811066b

Please sign in to comment.