Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

helper: Make sure directories are created before they are passed to container engine (podman) #4763

Merged
merged 1 commit into from
Dec 1, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 15 additions & 6 deletions infra/helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -277,18 +277,27 @@ def get_dockerfile_path(project_name):


def _get_corpus_dir(project_name=''):
"""Returns path to /corpus directory for the given project (if specified)."""
return os.path.join(BUILD_DIR, 'corpus', project_name)
"""Creates and returns path to /corpus directory for the given project (if specified)."""
directory = os.path.join(BUILD_DIR, 'corpus', project_name)
os.makedirs(directory, exist_ok=True)

return directory


def _get_output_dir(project_name=''):
"""Returns path to /out directory for the given project (if specified)."""
return os.path.join(BUILD_DIR, 'out', project_name)
"""Creates and returns path to /out directory for the given project (if specified)."""
directory = os.path.join(BUILD_DIR, 'out', project_name)
os.makedirs(directory, exist_ok=True)

return directory


def _get_work_dir(project_name=''):
"""Returns path to /work directory for the given project (if specified)."""
return os.path.join(BUILD_DIR, 'work', project_name)
"""Creates and returns path to /work directory for the given project (if specified)."""
directory = os.path.join(BUILD_DIR, 'work', project_name)
os.makedirs(directory, exist_ok=True)

return directory


def _get_project_language(project_name):
Expand Down