Skip to content

Commit

Permalink
Handle comments on the same line as package name (#1020)
Browse files Browse the repository at this point in the history
Co-authored-by: SKilbride <[email protected]>
  • Loading branch information
racerx2oo3 and SKilbride authored Aug 29, 2024
1 parent 600c811 commit d4812c0
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions glob/manager_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -410,6 +410,14 @@ def execute_install_script(url, repo_path, lazy_mode=False, instant_execution=Fa
print("Install: pip packages")
with open(requirements_path, "r") as 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())

if package_name and not package_name.startswith('#'):
Expand Down

0 comments on commit d4812c0

Please sign in to comment.