Bladeren bron

Don't mess with backslashes in GIT_SSH on Windows. Fixes #1008 (#1010)

Jelmer Vernooij 2 jaren geleden
bovenliggende
commit
7173c6eee1
1 gewijzigde bestanden met toevoegingen van 4 en 2 verwijderingen
  1. 4 2
      dulwich/client.py

+ 4 - 2
dulwich/client.py

@@ -1619,7 +1619,8 @@ class SubprocessSSHVendor(SSHVendor):
 
         if ssh_command:
             import shlex
-            args = shlex.split(ssh_command) + ["-x"]
+            args = shlex.split(
+                ssh_command, posix=(sys.platform != 'win32')) + ["-x"]
         else:
             args = ["ssh", "-x"]
 
@@ -1661,7 +1662,8 @@ class PLinkSSHVendor(SSHVendor):
 
         if ssh_command:
             import shlex
-            args = shlex.split(ssh_command) + ["-ssh"]
+            args = shlex.split(
+                ssh_command, posix=(sys.platform != 'win32')) + ["-ssh"]
         elif sys.platform == "win32":
             args = ["plink.exe", "-ssh"]
         else: