Skip to content
This repository was archived by the owner on Sep 11, 2025. It is now read-only.

Conversation

@mattjohnsonpint
Copy link
Contributor

@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 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 subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants