Skip to content

feat: support supplementary environment variables for hooks in App#5916

Open
Slackow wants to merge 1 commit intomodrinth:mainfrom
Slackow:main
Open

feat: support supplementary environment variables for hooks in App#5916
Slackow wants to merge 1 commit intomodrinth:mainfrom
Slackow:main

Conversation

@Slackow
Copy link
Copy Markdown

@Slackow Slackow commented Apr 26, 2026

Implementation of the following feature:
#1238

This is a feature present on other popular launchers (e.g. MultiMC, PrismLauncher, ATLauncher), so it would be great to include here as well to support more advanced hooking.

There was a PR open for this a while ago that was closed for being stale:
#1254

The difference with this PR is that instead of only substituting the text in the command, the variables are also provided as part of the environment, and arbitrary environment variables can be expanded. (e.g. $HOME), this is more in line with other launcher's implementations, and it also applies to all 3 hooks.

This does make it larger in scope, so a more thorough review is probably required, especially as a first time contributor. Thank you.

@modrinth-bot
Copy link
Copy Markdown
Member

Pull request changelog

App

Added

Changed

Deprecated

Removed

Fixed

Security

Website

Added

Changed

Deprecated

Removed

Fixed

Security

Hosting

Added

Changed

Deprecated

Removed

Fixed

Security

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants