Check protocol is SSH before connecting
This commit is contained in:
@@ -112,9 +112,11 @@ class Kamal::Cli::Build < Kamal::Cli::Base
|
|||||||
|
|
||||||
def connect_to_remote_host(remote_host)
|
def connect_to_remote_host(remote_host)
|
||||||
remote_uri = URI.parse(remote_host)
|
remote_uri = URI.parse(remote_host)
|
||||||
options = { user: remote_uri.user, port: remote_uri.port }.compact
|
if remote_uri.scheme == "ssh"
|
||||||
on(remote_uri.host, options) do
|
options = { user: remote_uri.user, port: remote_uri.port }.compact
|
||||||
execute "true"
|
on(remote_uri.host, options) do
|
||||||
|
execute "true"
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user