aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
author2xB <31772910+2xB@users.noreply.github.com>2019-04-12 00:32:12 +0200
committerGitHub <noreply@github.com>2019-04-12 00:32:12 +0200
commit59aeb62614ab07acb4b9520d81179d6e647dfbb7 (patch)
tree405db8746389de26a1319b6a8d268ca07505d9aa
parent7db010201783ae4b795908161e2027565e70a12f (diff)
downloadexternal_python_setuptools-59aeb62614ab07acb4b9520d81179d6e647dfbb7.tar.gz
external_python_setuptools-59aeb62614ab07acb4b9520d81179d6e647dfbb7.tar.bz2
external_python_setuptools-59aeb62614ab07acb4b9520d81179d6e647dfbb7.zip
FIX: git and hg revision checkout under Windows
Windows does not change the working directory for a process via `cd .. && <process>` (see e.g. this question: https://stackoverflow.com/q/55641332/8575607 ). This commit replaces the use of `cd .. &&` with arguments provided by `git` and `hg` respectively.
-rw-r--r--setuptools/package_index.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/setuptools/package_index.py b/setuptools/package_index.py
index 705a47cf..6b06f2ca 100644
--- a/setuptools/package_index.py
+++ b/setuptools/package_index.py
@@ -897,7 +897,7 @@ class PackageIndex(Environment):
if rev is not None:
self.info("Checking out %s", rev)
- os.system("(cd %s && git checkout --quiet %s)" % (
+ os.system("git -C %s checkout --quiet %s" % (
filename,
rev,
))
@@ -913,7 +913,7 @@ class PackageIndex(Environment):
if rev is not None:
self.info("Updating to %s", rev)
- os.system("(cd %s && hg up -C -r %s -q)" % (
+ os.system("hg --cwd %s up -C -r %s -q" % (
filename,
rev,
))