Skip to content

forge-1.7.gradle assumes Python is installed on a Linux system #2

@CreeperPookie

Description

@CreeperPookie

Although admittedly this is a minor bug (and doesn't hinder compilation on its own), something I noticed when trying to build is that the Python executable is hard-coded.

In the command that Gradle is given to execute get_version.py, firstly it assumes that python is installed on the system; This specifically is probably a safer call, as very few non-devs (if any?) would not have Python installed
More importantly though, Python is directly hard-coded as python3, making it completely break on a Windows-based system (on Windows it's simply python)

I don't think the solution would be to hard-code python-non-3 though, as that would break by default on Linux systems (unless python-is-python3 is installed (on apt anyway));
I think the best solution for this would be to either detect the OS at runtime and pick the executable from that, or migrate the script away from python and run it directly through Gradle (which definitely could be feasible, given how simple get_version.py is)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions