Commit 67b6d0d0 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki Committed by Xavier Thompson

[fix] Work around shebang line length limitation

Introduce a workaround for the shebang line length limitation
in zc.buildout.easy_install.
parent 6adceadc
...@@ -171,7 +171,12 @@ if is_win32: ...@@ -171,7 +171,12 @@ if is_win32:
def _safe_arg(arg): def _safe_arg(arg):
return '"%s"' % arg return '"%s"' % arg
else: else:
_safe_arg = str def _safe_arg(arg):
if len(arg) < 126:
return arg
else:
# Workaround for the shebang line length limitation.
return '/bin/sh\n"exec" "%s" "$0" "$@"' % arg
def call_subprocess(args, **kw): def call_subprocess(args, **kw):
if subprocess.call(args, **kw) != 0: if subprocess.call(args, **kw) != 0:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment