Skip to content

Commit

Permalink
fix: when a line inside "requirements.txt" has more than one space
Browse files Browse the repository at this point in the history
today we fail for the following requirements line "-r req-something.txt # some comment" because of the way we split the line
this change will just take the second item in the line (right after the '-r' flag)

in addition, this will fix the release phase on circle
  • Loading branch information
admons committed Mar 24, 2022
1 parent 155177f commit 9594b20
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ jobs:
command: npm run build
- run:
name: Release
command: npx semantic-release
command: npx semantic-release@15

workflows:
version: 2
Expand Down
2 changes: 1 addition & 1 deletion pysrc/requirements/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def parse(req_str_or_file):
# unsupported
continue
elif line.startswith('-r') or line.startswith('--requirement'):
_, new_filename = line.split()
new_filename = line.split()[1]
new_file_path = os.path.join(os.path.dirname(filename or '.'),
new_filename)
with open(new_file_path) as f:
Expand Down

0 comments on commit 9594b20

Please sign in to comment.