Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Support MODUS_HOME environment variable #639

Merged

Conversation

mattjohnsonpint
Copy link
Member

@mattjohnsonpint mattjohnsonpint commented Dec 9, 2024

Description

The Modus CLI expects to be able to create a directory for its own use, to store SDKs, Runtimes, and other data. In the case of installation via install.sh script, the CLI itself is stored in this directory.

The directory is currently hardcoded to $HOME/.modus on Linux/MacOS, and %userprofile%/.modus on Windows.

This PR allows the directory to be overridden with a MODUS_HOME environment variable. This is useful in the case where the user desires to place Modus's files somewhere else, such as if they don't have permission to write directly to their home dir (while uncommon, this might be the case for certain Windows configurations).

For example, if desired, a Windows user could execute the following from a cmd terminal to set a persistent environment variable to their user settings:

setx MODUS_HOME %APPDATA%\Modus

Docs: hypermodeinc/docs#72

Checklist

  • Code compiles correctly and linting passes locally
  • For all code changes, an entry added to the CHANGELOG.md file describing and linking to this PR
  • For public APIs, new features, etc., PR on docs repo staged and linked here

@mattjohnsonpint mattjohnsonpint requested a review from a team as a code owner December 9, 2024 19:19
@mattjohnsonpint mattjohnsonpint merged commit 931f5ef into main Dec 9, 2024
6 checks passed
@mattjohnsonpint mattjohnsonpint deleted the mjp/hyp-2746-allow-user-to-override-modus-home-dir branch December 9, 2024 19:46
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