Skip to contentSkip to conversation

git-p4: Fix p4 user cache population on Windows.

PATCH In review Simon Hausmann 2 participants 2 messages Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 git-p4: Fix p4 user cache population on Windows.

Fall back to USERPROFILE if HOME isn't set.

---
 contrib/fast-import/git-p4 |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
contrib/fast-import/git-p4 +2 -1
index e3404ca..1f5a56e 100755
@@ -901,7 +901,8 @@ class P4Sync(Command):
                            % (labelDetails["label"], change))
 
     def getUserCacheFilename(self):
-        return os.environ["HOME"] + "/.gitp4-usercache.txt"
+        home = os.environ.get("HOME", os.environ.get("USERPROFILE"))
+        return home + "/.gitp4-usercache.txt"
 
     def getUserMapFromPerforceServer(self):
         if self.userMapFromPerforceServer:
Signature · 1 line
1.5.3.rc0.63.gc956