Commit 7c9275ed 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 b8922ac2
......@@ -166,7 +166,12 @@ if is_win32:
def _safe_arg(arg):
return '"%s"' % arg
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):
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