There are two places where the home directory is set manually instead of depending on dynamic references:
|
path: /home/runner/.minecraft |
|
path: /home/runner/.minecraft |
This causes issues with Self-Hosted Runner's as the execution user is often a custom user and not the "runner" user as the Github Hosted Runner's uses.
While not ideal without a default Github variable to get the home directory a potential solution is to use ~/.minecraft which should resolve to the correct home directory whether Github Hosted or Self-Hosted.
Alternative and more elegant solution would likely be to add a parameter for mc-home-dir or something similar which would allow overriding the directories of headlessmc with the hmc.mcdir parameter and also update the cache locations (and anywhere else the .minecraft location is used)
There are two places where the home directory is set manually instead of depending on dynamic references:
mc-runtime-test/action.yml
Line 81 in 398830d
mc-runtime-test/action.yml
Line 88 in 398830d
This causes issues with Self-Hosted Runner's as the execution user is often a custom user and not the "runner" user as the Github Hosted Runner's uses.
While not ideal without a default Github variable to get the home directory a potential solution is to use
~/.minecraftwhich should resolve to the correct home directory whether Github Hosted or Self-Hosted.Alternative and more elegant solution would likely be to add a parameter for
mc-home-diror something similar which would allow overriding the directories of headlessmc with thehmc.mcdirparameter and also update the cache locations (and anywhere else the.minecraftlocation is used)