mirror of
https://github.com/Comfy-Org/ComfyUI-Manager.git
synced 2025-12-18 10:52:59 +08:00
Handle comments on the same line as package name (#1020)
Co-authored-by: SKilbride <110414370+SKilbride@users.noreply.github.com>
This commit is contained in:
parent
600c8117a3
commit
d4812c09a4
@ -410,6 +410,14 @@ def execute_install_script(url, repo_path, lazy_mode=False, instant_execution=Fa
|
|||||||
print("Install: pip packages")
|
print("Install: pip packages")
|
||||||
with open(requirements_path, "r") as requirements_file:
|
with open(requirements_path, "r") as requirements_file:
|
||||||
for line in requirements_file:
|
for line in requirements_file:
|
||||||
|
#handle comments
|
||||||
|
if '#' in line:
|
||||||
|
if line.strip()[0] == '#':
|
||||||
|
print("Line is comment...skipping")
|
||||||
|
continue
|
||||||
|
else:
|
||||||
|
line = line.split('#')[0].strip()
|
||||||
|
|
||||||
package_name = remap_pip_package(line.strip())
|
package_name = remap_pip_package(line.strip())
|
||||||
|
|
||||||
if package_name and not package_name.startswith('#'):
|
if package_name and not package_name.startswith('#'):
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user