os.execv on Windows joins its arguments with spaces and quotes nothing, so only the interpreter and script path, quoted by hand, survived a restart. An argument with a space, such as --output-directory "D:\My Outputs", was split in two and ComfyUI failed to start with 'unrecognized arguments'. Build the command in manager_util.build_restart_command and use it at the three restart sites: the reboot endpoints of the glob and legacy servers and the prestartup restart. On Windows every entry is quoted with subprocess.list2cmdline; other platforms get the same list as before. The endpoints still drop --windows-standalone-build, now every occurrence rather than only the first, and the prestartup restart still keeps it. Port of #3488 to v4 (#3339).
ComfyUI-Manager: Core Backend (glob)
This directory contains the Python backend modules that power ComfyUI-Manager, handling the core functionality of node management, downloading, security, and server operations.
Core Modules
- manager_downloader.py: Handles downloading operations for models, extensions, and other resources.
- manager_util.py: Provides utility functions used throughout the system.
Specialized Modules
- cm_global.py: Maintains global variables and state management across the system.
- cnr_utils.py: Helper utilities for interacting with the custom node registry (CNR).
- git_utils.py: Git-specific utilities for repository operations.
- node_package.py: Handles the packaging and installation of node extensions.
- security_check.py: Implements the multi-level security system for installation safety.