Skip to content

Commit 148fa95

Browse files
authored
Remove duplicated newline in shebang of windows launcher (#221)
1 parent d1f40d6 commit 148fa95

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

distlib/scripts.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ def _build_shebang(self, executable, post_interp):
177177
else:
178178
result = b'#!/bin/sh\n'
179179
result += b"'''exec' " + executable + post_interp + b' "$0" "$@"\n'
180-
result += b"' '''"
180+
result += b"' '''\n"
181181
return result
182182

183183
def _get_shebang(self, encoding, post_interp=b'', options=None):
@@ -258,9 +258,6 @@ def get_manifest(self, exename):
258258

259259
def _write_script(self, names, shebang, script_bytes, filenames, ext):
260260
use_launcher = self.add_launchers and self._is_nt
261-
linesep = os.linesep.encode('utf-8')
262-
if not shebang.endswith(linesep):
263-
shebang += linesep
264261
if not use_launcher:
265262
script_bytes = shebang + script_bytes
266263
else: # pragma: no cover

0 commit comments

Comments
 (0)