Commit 59aeb626 authored by 2xB's avatar 2xB Committed by GitHub

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.
parent 7db01020
......@@ -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,
))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment