distlib
distlib copied to clipboard
In general, ScriptMaker does not validate the Python executable is a shell script or not.
Original report by 林玮 (Jade Lin) (Bitbucket: 林玮 (Jade Lin), ).
The executable path that ScriptMaker got may be a script. For example, the Python executable installed from nix is a bash script like this.
#! /nix/store/ra8yvijdfjcs5f66b99gdjn86gparrbz-bash-4.4-p23/bin/bash -e
export NIX_PYTHONPREFIX='/nix/store/i46k148mi830riq4wxh49ki8qmq0731k-python3-3.9.2-env'
export NIX_PYTHONEXECUTABLE='/nix/store/i46k148mi830riq4wxh49ki8qmq0731k-python3-3.9.2-env/bin/python3.9'
export NIX_PYTHONPATH='/nix/store/i46k148mi830riq4wxh49ki8qmq0731k-python3-3.9.2-env/lib/python3.9/site-packages'
export PYTHONNOUSERSITE='true'
exec "/nix/store/7pjbbmnrch7frgyp7gz19ay0z1173c7y-python3-3.9.2/bin/python3.9" "$@"
ScriptMaker only validates it and adapts it while running on the Java platform. Maybe refactor to apply the adaption for general cases.