Skip to content

fix(mkconcore): launch quoted tool paths correctly in Windows run.bat and debug.bat - #639

Open
Siddhanthguptaa wants to merge 1 commit into
ControlCore-Project:devfrom
Siddhanthguptaa:fix/windows-start-title
Open

Siddhanthguptaa wants to merge 1 commit into
ControlCore-Project:devfrom
Siddhanthguptaa:fix/windows-start-title

Conversation

@Siddhanthguptaa

Copy link
Copy Markdown

Fixes #638

Since #541 quotes tool executables, two Windows launch lines broke:

  • run.bat: start /B /D "CZ" "python" "x.py" — start takes the first quoted argument as the window title (docs), so python never runs. Now start "" /B /D ..., the same idiom concore_cli/commands/editor.py already uses.
  • debug.bat: cmd /K "python" "x.py" — cmd strips the first and last quote (docs) and looks for python" "x.py. Now the payload is wrapped once more: cmd /K ""python" "x.py"", which is what cmd saw before fix(mkconcore): handle tool executable paths with spaces in generated scripts #541.

Applied to the Python, Octave and MATLAB lines. C++, Verilog and Java lines start with an unquoted cmd /c / cmd /K and are unchanged. posix and docker output are unchanged.

Testing

  • Extended test_build_command_quotes_windows_tool_path_with_spaces to check the exact run.bat and debug.bat lines; it fails on current dev and passes with this change.
  • pytest on Windows 11 / Python 3.11: 238 passed, 12 skipped (POSIX-only). ruff check . and ruff format --check . pass.
  • Manual: demo/sample in windows mode now runs both nodes to simtime 15 (retry=0); before, neither started. debug.bat quoting checked with a path containing spaces.
  • Octave (11.3.0): with this change octave-cli is launched (before, it never started). The Octave node then stops at a separate, older quoting issue in --eval "run("x.m")" (Windows passes run(x.m) to Octave); I'll send that as a follow-up PR.
  • Not tested: MATLAB.

Note: the cpp-* CI jobs are currently failing on dev (tryparam tests in TestConcoreHpp); that is unrelated to this change.

Quoting tool executables broke two Windows launch lines:
- start takes the first quoted argument as the window title, so
  `start /B /D "CZ" "python" "x.py"` never ran python. Pass an empty
  title.
- cmd /K strips the outer quotes of `"python" "x.py"`. Wrap the
  payload in one more pair of quotes.
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