This commit is contained in:
Vasiliy Gokoyev 2023-08-04 23:22:48 +01:00 committed by GitHub
commit 0ac3ad0925
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -77,7 +77,14 @@ class ActionModule(ActionBase):
if self._host_is_ipv6_address(host):
return '[%s%s]:%s' % (user_prefix, host, path)
return '%s%s:%s' % (user_prefix, host, path)
#preserve formatting of remote paths if host or user@host is explicitly defined in the path
if ':' not in path:
return '%s%s:%s' % (user_prefix, host, path)
elif '@' not in path:
return '%s%s' % (user_prefix, path)
else:
return path
def _process_origin(self, host, path, user):