Skip to content

Commit

Permalink
fix sed unterminated `s' command error on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
toyobayashi committed Jan 28, 2024
1 parent be69f9f commit 7a62b19
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions pylib/gyp/generator/make.py
Original file line number Diff line number Diff line change
Expand Up @@ -448,8 +448,12 @@ def CalculateGeneratorInputInfo(params):
# Add extra rules as in (2).
# We remove slashes and replace spaces with new lines;
# remove blank lines;
# delete the first line and append a colon to the remaining lines.
sed -e 's|\\||' -e 'y| |\n|' $(depfile).raw |\
# delete the first line and append a colon to the remaining lines.""" +
(r"""
sed -e 's|\\\\||' -e 'y| |\n|' $(depfile).raw |\\""" if sys.platform == 'win32'
else r"""
sed -e 's|\\||' -e 'y| |\n|' $(depfile).raw |\\""") +
r"""
grep -v '^$$' |\
sed -e 1d -e 's|$$|:|' \
>> $(depfile)
Expand Down

0 comments on commit 7a62b19

Please sign in to comment.