Skip to content

Commit 8c9d87c

Browse files
authored
do not fail on reference files git commands (#73)
1 parent 042165c commit 8c9d87c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

test.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,10 @@ def testHelloWorld(cmd):
412412
subprocess.check_call(["git", "clean", "-fdx", "--exclude=*.hash"], stderr=subprocess.STDOUT, cwd=destinationReal)
413413
if glob.glob(destinationReal + "/*.mat.xz"):
414414
subprocess.check_call(["find", ".", "-name", "*.mat.xz", "-exec", "xz", "--decompress", "--keep", "{}", ";"], stderr=subprocess.STDOUT, cwd=destinationReal)
415-
githash = subprocess.check_output(["git", "rev-parse", "--verify", "HEAD"], stderr=subprocess.STDOUT, cwd=destinationReal, encoding='utf8')
415+
try:
416+
githash = subprocess.check_output(["git", "rev-parse", "--verify", "HEAD"], stderr=subprocess.STDOUT, cwd=destinationReal, encoding='utf8')
417+
except subprocess.CalledProcessError as e:
418+
print(e.output)
416419

417420
if "git-directory" in c["referenceFiles"]:
418421
c["referenceFiles"] = os.path.join(destinationReal, c["referenceFiles"]['git-directory'])

0 commit comments

Comments
 (0)