Skip to content

fix: 处理问题 #173#193

Open
liaoyl830 wants to merge 1 commit into
shenminglinyi:masterfrom
liaoyl830:fix/issue-173
Open

fix: 处理问题 #173#193
liaoyl830 wants to merge 1 commit into
shenminglinyi:masterfrom
liaoyl830:fix/issue-173

Conversation

@liaoyl830

@liaoyl830 liaoyl830 commented Jun 8, 2026

Copy link
Copy Markdown

Summary

  • Remove the raw %~dpI token from the Windows launcher comment
  • Keep the functional for %%I ... %%~dpI path extraction logic unchanged
  • Avoid cmd.exe parsing the comment as an invalid batch parameter substitution on Windows

Verification

  • cmd.exe //d //c 'C:\Users\liaoy\AppData\Local\Temp\plotpilot_issue_173_old.bat' → reproduced the old %~dpI comment parsing failure
  • cmd.exe //d //c 'C:\Users\liaoy\AppData\Local\Temp\plotpilot_issue_173_new.bat' → new comment variant printed NEW_PASS
  • cmd.exe //d //c 'C:\Users\liaoy\AppData\Local\Temp\plotpilot_issue_173_extract_new.bat' → verified PYTHON_DIR=C:\Program Files\Python314\ and PYTHONW_EXE=C:\Program Files\Python314\pythonw.exe
  • git diff --check

Closes #173

Summary by CodeRabbit

  • Bug Fixes
    • Improved Python installer launcher reliability by enhancing path handling for installations located in directories with spaces and special characters.

@liaoyl830 liaoyl830 requested a review from shenminglinyi as a code owner June 8, 2026 15:34
@coderabbitai

coderabbitai Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 72b87a21-e5b3-4a11-b425-1d7e47f98be2

📥 Commits

Reviewing files that changed from the base of the PR and between 1c7df5e and 40e6491.

📒 Files selected for processing (1)
  • tools/plotpilot.bat

📝 Walkthrough

Walkthrough

Updated tools/plotpilot.bat to fix a Windows 11 compatibility issue: removed special characters from a comment that caused batch parsing errors, and ensured the script safely extracts the Python executable directory using %%~dpI before deriving PYTHONW_EXE with proper fallback to python.exe.

Changes

Windows 11 Script Compatibility

Layer / File(s) Summary
Python directory extraction and fallback logic
tools/plotpilot.bat
Comment clarifies safe directory extraction using for %%I ... set PYTHON_DIR=%%~dpI to handle paths with spaces or special characters. Fallback uses pythonw.exe if available in the extracted directory, otherwise defaults to python.exe.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🐰 A comment with % caused the batch to fail,
On Windows 11, our little script turned pale,
Safe extraction now guards the Python way,
With fallbacks in place, scripts work all day! ✨

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Description check ⚠️ Warning The pull request description does not follow the required template structure; it lacks required sections like change type, architecture impact, and testing verification. Restructure the description to match the template: add change type checkbox marking, architecture impact section, testing section with actual test commands run, and risk assessment.
Title check ❓ Inconclusive The title is vague and does not clearly describe the specific change; it only references 'issue #173' without stating what the fix entails. Replace with a more descriptive title such as 'fix: remove %~dpI token from comment in plotpilot.bat to prevent cmd.exe parsing error' to clearly indicate the nature of the fix.
✅ Passed checks (3 passed)
Check name Status Explanation
Linked Issues check ✅ Passed The code changes directly address issue #173 by removing the problematic %~dpI token from the comment line while preserving the functional path extraction logic.
Out of Scope Changes check ✅ Passed The changes are strictly in-scope: only a comment modification in plotpilot.bat to fix the Windows 11 startup script error, with no unrelated alterations.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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.

win11下启动脚本报错问题

1 participant