mirror of
https://github.com/Comfy-Org/ComfyUI-Manager.git
synced 2026-11-04 23:37:31 +00:00
[GH-ISSUE #3339] [Bug] Restart command strips quotes from CLI arguments containing spaces #1145
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Comfy-Org/ComfyUI-Manager#1145
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @gershu-ar on GitHub (Oct 3, 2026).
Original GitHub issue: https://github.com/Comfy-Org/ComfyUI-Manager/issues/3339
Describe the bug
When ComfyUI-Manager restarts ComfyUI after installing or updating custom nodes, by clicking on the UI's
Restartbutton, it reconstructs the startup command directly fromsys.argv. Sincesys.argvelements lose their original shell quotes during Python initialization, joining them without escaping or re-quoting causes space-containing arguments to break upon restart.How to reproduce
python main.py --browser-profile "Profile 1"Command: [..., '--browser-profile', 'Profile 1']main.pycrashes on boot withmain.py: error: unrecognized arguments: 1becauseProfile 1was passed without quotes.Expected behavior
Arguments in
sys.argvcontaining spaces should be safely escaped or re-quoted (lusingshlex.quote()orsubprocess.list2cmdline()) when rebuilding the restart command line string.