浏览代码

Support TMPDIR as example system directory in symlink test

Fixes #1885
Jelmer Vernooij 4 月之前
父节点
当前提交
4f52beca89
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      tests/test_porcelain.py

+ 1 - 1
tests/test_porcelain.py

@@ -1684,7 +1684,7 @@ class AddTests(PorcelainTestCase):
             symlink_target = os.environ["TEMP"]
         else:
             # On Unix-like systems, use /tmp
-            symlink_target = "/tmp"
+            symlink_target = os.environ.get("TMPDIR", "/tmp")
         os.symlink(symlink_target, symlink_path)
 
         # Adding a symlink to a directory outside the repo should raise ValueError