Skip to content

Handle launch outside project directories#401

Draft
Mirochill wants to merge 1 commit into
opensafely-core:mainfrom
Mirochill:fix-375-launch-project-dir
Draft

Handle launch outside project directories#401
Mirochill wants to merge 1 commit into
opensafely-core:mainfrom
Mirochill:fix-375-launch-project-dir

Conversation

@Mirochill
Copy link
Copy Markdown

Fixes #375

Summary

  • Check for project.yaml in the launch directory before running Docker preflight or creating a launch container.
  • Print a direct error telling the user to run from an OpenSAFELY project directory or pass --directory.
  • Update launch tests to use a temporary project directory and add coverage for the missing-project case.

Validation

  • git diff --check
  • git diff --check HEAD -- opensafely/launch.py tests/test_launch.py
  • rg -n "is_project_directory|No project.yaml|OpenSAFELY project directory|project_dir|--directory" opensafely/launch.py tests/test_launch.py

Not run locally: pytest, test suite, build, lint, install, Docker, or any project command.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Running opensafely launch should handle not being in the right directory better

1 participant