Commit 168d7921 authored by Nico's avatar Nico
Browse files

fix symlinks in zip archives not being extracted correctly

parent ee937b7a
......@@ -10,6 +10,7 @@ import os.path
import re
import tempfile
import sys
import subprocess
......@@ -34,7 +35,9 @@ def extract_zip(artifact_zipfile):
with zipfile.ZipFile(artifact_zipfile) as artifact_zip:
version = find_version_from_archive(artifact_zip.infolist())
with tempfile.TemporaryDirectory(dir=os.getcwd()) as tempdir:
# Python ZipFile doesn't support symlinks
subprocess.check_call(['unzip',, '-d{}'.format(tempdir)], stdin=artifact_zipfile)
outputdir = os.path.join(tempdir, "gluon", "output")
os.rename(outputdir, version)
return version
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