Skip to content

fix(entrypoint): assimilate on Linux

Matthew Clarkson requested to merge assimilate-entrypoint into main

If a Linux user has Wine installed with the binfmt_misc registration, an APE binary is picked up and ran under the Wine runtime.

Normally, this does not occur, as we force execution under the launcher.

However, Python sys.executable will return the original binary so any Python script that uses sys.executable with subprocess will unexpectedly run under Wine.

Assimilating the binary on Linux avoids this situation. In all other cases we can symlink to the binary.

Merge request reports