Skip to content

fix: validate problematic project paths#2870

Draft
skyswordw wants to merge 2 commits into
beeware:mainfrom
skyswordw:fix-project-path-validation
Draft

fix: validate problematic project paths#2870
skyswordw wants to merge 2 commits into
beeware:mainfrom
skyswordw:fix-project-path-validation

Conversation

@skyswordw
Copy link
Copy Markdown

Adds project path validation in BaseCommand for known path characters that can break third-party build tools.

This validates the Briefcase project location separately from the existing data path validation:

  • paths containing , raise an error
  • paths containing U+200E LEFT-TO-RIGHT MARK raise an error on Windows
  • paths containing spaces emit a warning banner

Fixes #2580

Validation performed:

  • .venv/bin/python -m pytest -q tests/commands/base/test_paths.py -vv
  • .venv/bin/python -m pytest -q tests/commands/base/test_paths.py tests/commands/base/test_validate_locale.py tests/commands/base/test_verify_tools.py tests/commands/base/test_properties.py
  • .venv/bin/ruff format --check src/briefcase/commands/base.py tests/commands/base/test_paths.py
  • .venv/bin/ruff check src/briefcase/commands/base.py tests/commands/base/test_paths.py

Not run: full pre-commit. Its first-time hook environment initialization hung locally after starting pre-commit-hooks, so I ran the relevant local pytest and ruff checks directly.

PR Checklist:

  • I will abide by the BeeWare Code of Conduct
  • I have read and have followed the CONTRIBUTING.md file
  • This PR was generated or assisted using an AI tool

Assisted-by: OpenAI GPT-5.5

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.

When file paths for Briefcase projects contain unconventional characters, third party tools may fail to run properly

1 participant