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

Allow user configuration and support XDG spec by default #8

Merged
merged 4 commits into from
Mar 7, 2022

Conversation

marwanhawari
Copy link
Owner

This PR introduces the ability for users to configure the stewPath (which is where stew data is stored - originally hardcoded as ~/.stew) and the stewBinPath (which is where binaries are actually installed - originally harcoded as ~/.stew/bin). There are 3 ways to configure these:

  1. Upon initial installation with the install.sh script, it will prompt you to configure these.
  2. If you install the stew binary without the install.sh script or later realize you want to change them, you can use the new stew config subcommand.
  3. You can manually edit the stew config file ($XDG_CONFIG_HOME/config.json or ~/.config/stew/config.json on Linux/macOS and ~/AppData/Local/stew/Config/config.json on Windows)

Additionally, the new default locations for stewPath and stewBinPath follow the XDG spec:

Linux/macOS Windows
stewPath $XDG_DATA_HOME/stew or ~/.local/share/stew ~/AppData/Local/stew
stewBinPath $XDG_DATA_HOME/stew/bin or ~/.local/share/stew/bin ~/AppData/Local/stew/bin

@marwanhawari marwanhawari self-assigned this Mar 7, 2022
@marwanhawari
Copy link
Owner Author

Resolves #4

@marwanhawari marwanhawari merged commit f80e9d3 into main Mar 7, 2022
@marwanhawari marwanhawari deleted the xdg_spec_4 branch March 7, 2022 08:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant