[PR #3341] Fix legacy restart with paths and arguments containing spaces #3210

Open
opened 2026-10-28 21:16:07 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Comfy-Org/ComfyUI-Manager/pull/3341
Author: @ArianMoeini
Created: 10/3/2026
Status: 🔄 Open

Base: main ← Head: fix/restart-argv-spaces


📝 Commits (1)

  • de6467d fix: preserve restart arguments across execv

📊 Changes

3 files changed (+77 additions, -12 deletions)

View changed files

📝 glob/manager_server.py (+2 -12)
➕ glob/restart_command.py (+18 -0)
➕ tests/test_restart_command.py (+57 -0)

📄 Description

Fixes #3339

Summary

The legacy restart path manually wrapped the Python executable and script path in quotes on Windows. It passes those strings to os.execv, which takes an argument vector directly. The quotes become part of the path or argument instead of protecting spaces.

Build the restart argument vector in one small helper. Keep the existing module entry-point behavior and removal of --windows-standalone-build, while passing paths and arguments through without shell quoting.

Validation

  • python3 -m unittest discover -s tests -p test_restart_command.py -v — 3 passed.
  • git diff --check and Python compilation — passed.
  • The regression test launches a child process through os.execv with spaces in its script path and argument.
  • Windows runtime validation is still needed in CI or by a Windows maintainer.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Comfy-Org/ComfyUI-Manager/pull/3341 **Author:** [@ArianMoeini](https://github.com/ArianMoeini) **Created:** 10/3/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `fix/restart-argv-spaces` --- ### 📝 Commits (1) - [`de6467d`](https://github.com/Comfy-Org/ComfyUI-Manager/commit/de6467d32231f6268d6631a42b02b90668c8aab6) fix: preserve restart arguments across execv ### 📊 Changes **3 files changed** (+77 additions, -12 deletions) <details> <summary>View changed files</summary> 📝 `glob/manager_server.py` (+2 -12) ➕ `glob/restart_command.py` (+18 -0) ➕ `tests/test_restart_command.py` (+57 -0) </details> ### 📄 Description Fixes #3339 ## Summary The legacy restart path manually wrapped the Python executable and script path in quotes on Windows. It passes those strings to `os.execv`, which takes an argument vector directly. The quotes become part of the path or argument instead of protecting spaces. Build the restart argument vector in one small helper. Keep the existing module entry-point behavior and removal of `--windows-standalone-build`, while passing paths and arguments through without shell quoting. ## Validation - `python3 -m unittest discover -s tests -p test_restart_command.py -v` — 3 passed. - `git diff --check` and Python compilation — passed. - The regression test launches a child process through `os.execv` with spaces in its script path and argument. - Windows runtime validation is still needed in CI or by a Windows maintainer. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Comfy-Org/ComfyUI-Manager#3210
No description provided.