Skip to content

Commit

Permalink
Remove duplicated newline in shebang of windows launcher (#221)
Browse files Browse the repository at this point in the history
  • Loading branch information
A2uria authored Oct 9, 2024
1 parent d1f40d6 commit 148fa95
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions distlib/scripts.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ def _build_shebang(self, executable, post_interp):
else:
result = b'#!/bin/sh\n'
result += b"'''exec' " + executable + post_interp + b' "$0" "$@"\n'
result += b"' '''"
result += b"' '''\n"
return result

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

def _write_script(self, names, shebang, script_bytes, filenames, ext):
use_launcher = self.add_launchers and self._is_nt
linesep = os.linesep.encode('utf-8')
if not shebang.endswith(linesep):
shebang += linesep
if not use_launcher:
script_bytes = shebang + script_bytes
else: # pragma: no cover
Expand Down

0 comments on commit 148fa95

Please sign in to comment.