Skip to content

fix(scripts): support python-only PATH in Cursor sync - #343

Merged
conorbronsdon merged 2 commits into
mainfrom
codex/fix-cursor-python-fallback
Sep 23, 2026
Merged

conorbronsdon merged 2 commits into
mainfrom
codex/fix-cursor-python-fallback

Conversation

@conorbronsdon

Copy link
Copy Markdown
Owner

Summary

Use the available Python interpreter (python3 or python) in scripts/sync-cursor-rules.sh, matching the resolution used by sync-plugin-skill.sh. This completes the Python-only Windows PATH follow-up identified by @Sharawey74 in #342.

Interpreter selection now happens before generated files are written, so a missing interpreter fails early.

Verification

  • Ran bash scripts/sync-cursor-rules.sh; generated files stayed unchanged.
  • Ran with an isolated PATH containing python and no python3; the script succeeded and generated files stayed unchanged.
  • npm test: 21 passed, 0 failed.
  • git diff --check: passed.

This is contributor tooling only; no changelog entry is needed under the repository policy.

@qodo-free-for-open-source-projects

Copy link
Copy Markdown

PR Summary by Qodo

Support Python-only PATHs in Cursor rule synchronization

🐞 Bug fix 🕐 Less than 10 minutes

Grey Divider

AI Description

• Resolves either python3 or python before synchronizing Cursor rules.
• Fails before generating files when no Python interpreter is available.
Diagram

graph TD
  Sync["Cursor sync"] --> Resolve{"Python available?"} -->|found| Flatten["Skill flattener"] --> Transform["Python transform"] --> Rule["Cursor rule"]
  Resolve -->|missing| Fail["Early failure"]
Loading
High-Level Assessment

The chosen approach is optimal for this focused portability fix. It matches the interpreter-resolution pattern already used by sync-plugin-skill.sh, avoids platform-specific assumptions, and resolves prerequisites before generated files can be modified.

Files changed (1) +2 / -1

Bug fix (1) +2 / -1
sync-cursor-rules.shFall back to 'python' when 'python3' is unavailable +2/-1

Fall back to 'python' when 'python3' is unavailable

• Resolves the available Python executable from 'PATH' and uses it for the Cursor rule transformation. Interpreter selection occurs before generation starts, supporting Windows environments that expose only 'python' and failing early when neither command exists.

scripts/sync-cursor-rules.sh

@qodo-free-for-open-source-projects

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider

Great, no issues found!

Qodo reviewed your code and found no material issues that require review

Grey Divider

Tip of the day
💡 Did you know, you can keep summaries lean with Finding overflow, which tucks the rest behind 'View more'

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

@conorbronsdon
conorbronsdon merged commit 7e58aef into main Sep 23, 2026
7 checks passed
@conorbronsdon
conorbronsdon deleted the codex/fix-cursor-python-fallback branch September 23, 2026 15:38
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.

1 participant