Commit cbb9a787 authored by Robin Sonnabend's avatar Robin Sonnabend
Browse files

Fix chdir in loop

parent d04deddb
Pipeline #578 passed with stage
in 11 minutes and 5 seconds
...@@ -67,17 +67,15 @@ def build_package(repo_dir, package_dir, name, ...@@ -67,17 +67,15 @@ def build_package(repo_dir, package_dir, name,
workdir = os.path.join(tempdir, pkg_dir) workdir = os.path.join(tempdir, pkg_dir)
print("Content of tempdir:", os.listdir(workdir)) print("Content of tempdir:", os.listdir(tempdir))
print("Content of workdir:", os.listdir(workdir)) print("Content of workdir:", os.listdir(workdir))
if additional_content is not None: if additional_content is not None:
print("applying additional content") print("applying additional content")
os.chdir(workdir)
for content in additional_content: for content in additional_content:
target_dir = content["target_dir"] target_dir = content["target_dir"]
print("applying", content, "in", target_dir) print("applying", content, "in", target_dir)
os.listdir(target_dir) os.chdir(os.path.join(workdir, target_dir))
os.chdir(target_dir)
if "patch_dir" in content: if "patch_dir" in content:
abs_patch_dir = os.path.join( abs_patch_dir = os.path.join(
repo_dir, content["patch_dir"]) repo_dir, content["patch_dir"])
......
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