We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5eab800 commit 858a1efCopy full SHA for 858a1ef
tests/ci_runner.py
@@ -175,10 +175,7 @@ def patch_file(file_name: str) -> None:
175
# when invoking a subprocess, bash stores the location where
176
# it's supposed to continue parsing from, so it's a good idea
177
# to to not move things around
178
- if line[-1] == '\n':
179
- # It could be that this is the last line and missing a new line
180
- line = line[:-1]
181
- line = line.replace(OLD_REPO, NEW_REPO) + ' \n'
+ line = line.rstrip('\n').replace(OLD_REPO, NEW_REPO) + ' \n'
182
outf.write(line)
183
os.chmod(file_name + '._new_', os.stat(file_name).st_mode)
184
os.rename(file_name + '._new_', file_name)
0 commit comments