-
Notifications
You must be signed in to change notification settings - Fork 102
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
Add support for XDG directories #726
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Return xdgDir if `configDir` in user home does not already exist and that `XDG_CONFIG_HOME` is not empty.
This displays each folder removed on its own line.
chrnorm
requested changes
Aug 12, 2024
chrnorm
approved these changes
Aug 20, 2024
Thankyou @chris3ware 🙌 |
Just found granted today, seems great! Any chance of a release soon that'd include this? the latest 0.32 release predates this by a week |
tmeijn
pushed a commit
to tmeijn/dotfiles
that referenced
this pull request
Sep 23, 2024
This MR contains the following updates: | Package | Update | Change | |---|---|---| | [common-fate/granted](https://github.com/common-fate/granted) | minor | `v0.32.0` -> `v0.33.0` | MR created with the help of [el-capitano/tools/renovate-bot](https://gitlab.com/el-capitano/tools/renovate-bot). **Proposed changes to behavior should be submitted there as MRs.** --- ### Release Notes <details> <summary>common-fate/granted (common-fate/granted)</summary> ### [`v0.33.0`](https://github.com/common-fate/granted/releases/tag/v0.33.0) [Compare Source](common-fate/granted@v0.32.0...v0.33.0) This release adds [support for XDG directories](common-fate/granted#726) (thankyou [@​chris3ware](https://github.com/chris3ware)!), and adds a new `granted request close` command for closing Just-In-Time Access Requests in Common Fate. #### What's Changed - if we run into the issue with activation, print the diagnostics by [@​meyerjrr](https://github.com/meyerjrr) in common-fate/granted#734 - Open the common fate console by [@​JoshuaWilkes](https://github.com/JoshuaWilkes) in common-fate/granted#732 - Add support for custom browser launch templates by [@​chrnorm](https://github.com/chrnorm) in common-fate/granted#731 - Add messaging when the proxy command cannot connect to the target in SSM by [@​JoshuaWilkes](https://github.com/JoshuaWilkes) in common-fate/granted#735 - Add support for XDG directories by [@​chris3ware](https://github.com/chris3ware) in common-fate/granted#726 - Add 'granted request close' subcommand by [@​ckluy31](https://github.com/ckluy31) in common-fate/granted#740 - Fix success message when access request is closed by [@​ckluy31](https://github.com/ckluy31) in common-fate/granted#743 - Fix nil pointer error in registry sync when merging fails with an unknown error by [@​JoshuaWilkes](https://github.com/JoshuaWilkes) in common-fate/granted#744 - Granted login deprecation message should be clearer by [@​ckluy31](https://github.com/ckluy31) in common-fate/granted#745 #### New Contributors - [@​chris3ware](https://github.com/chris3ware) made their first contribution in common-fate/granted#726 **Full Changelog**: common-fate/granted@v0.32.0...v0.33.0 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever MR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this MR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box --- This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40NDAuNyIsInVwZGF0ZWRJblZlciI6IjM3LjQ0MC43IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJSZW5vdmF0ZSBCb3QiXX0=-->
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What changed?
Updates have been made to make use of the XDG Base directory specification if the environment variables are set on the users host machine.
config file is stored in
$XDG_CONFIG_HOME
log file is stored in
$XDG_STATE_HOME
FrecencyStore is stored in
$XDG_CACHE_HOME
Why?
To de-clutter a users
$HOME
directory.To attempt to resolve #570
How did you test it?
Tested locally with
make cli
with the environment variables set and unset. Went through initial configuration, assuming roles and uninstalling on macOS. I can install, setup, assume roles and uninstall with only 1 problem:With the XDG environment variables set, I see the following error in the log file:
I must be missing a step somewhere because
~/.cache/.dgranted
isn't being created. I'm fairly new to go and programming in general so any assistance would be very welcome. No doubt there will be a better way to achieve some of this, but thought I would get the ball rolling 😃Potential risks
Unknown
Is patch release candidate?
Unknown
Link to relevant docs PRs
https://specifications.freedesktop.org/basedir-spec/latest/
https://wiki.archlinux.org/title/XDG_Base_Directory