Commit c6da5c8c authored by Ben Noordhuis's avatar Ben Noordhuis Committed by James M Snell
Browse files

build: better support for python3 systems

Improve support for systems where `python` is actually `python3`.

Not all systems have a `python2` binary, so simply updating the shebang
won't work.

What we can do is apply some cleverness: start life as a shell script,
locate the python binary, then re-execute the script but this time as
python code.

Special care is taken to ensure that spaces in arguments are passed on
verbatim.

PR-URL: https://github.com/nodejs/node/pull/14737


Reviewed-By: default avatarAnna Henningsen <anna@addaleax.net>
Reviewed-By: default avatarDaniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: default avatarColin Ihrig <cjihrig@gmail.com>
Reviewed-By: default avatarJames M Snell <jasnell@gmail.com>
Reviewed-By: default avatarGibson Fahnestock <gibfahn@gmail.com>
parent 77214567
Supports Markdown
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