From 43564d2e8f3b95f33e10a5c8cc2d75c0252d659a Mon Sep 17 00:00:00 2001 From: Abhishek Kumar Singh Date: Wed, 16 Oct 2019 21:57:51 +0530 Subject: Update cmd.py --- git/cmd.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'git/cmd.py') diff --git a/git/cmd.py b/git/cmd.py index a06daaaf..78319c75 100644 --- a/git/cmd.py +++ b/git/cmd.py @@ -330,8 +330,7 @@ class Git(LazyMixin): but git stops liking them as it will escape the backslashes. Hence we undo the escaping just to be sure. """ - if url.startswith('$HOME/'): - url = url.replace('$HOME/', '~/') + url = os.path.expandvars(url) if url.startswith('~'): url = os.path.expanduser(url) url = url.replace("\\\\", "\\").replace("\\", "/") -- cgit v1.2.1