diff --git a/bench/app.py b/bench/app.py index e0da4e18..6a9d4e97 100755 --- a/bench/app.py +++ b/bench/app.py @@ -116,7 +116,7 @@ class AppMeta: name = url if url else self.name if name.startswith("git@") or name.startswith("ssh://"): self.use_ssh = True - _first_part, _second_part = name.split(":") + _first_part, _second_part = self.name.rsplit(":", 1) self.remote_server = _first_part.split("@")[-1] self.org, _repo = _second_part.rsplit("/", 1) else: diff --git a/bench/tests/test_utils.py b/bench/tests/test_utils.py index 3c2b3307..f91e8785 100644 --- a/bench/tests/test_utils.py +++ b/bench/tests/test_utils.py @@ -73,3 +73,7 @@ class TestUtils(unittest.TestCase): self.assertEqual("11.0", fake_bench.apps.states["frappe"]["version"]) shutil.rmtree(bench_dir) + + def test_ssh_ports(self): + app = App("git@github.com:22:frappe/frappe") + self.assertEqual((app.use_ssh, app.org, app.repo), (True, "frappe", "frappe")) \ No newline at end of file