[PR #40] [MERGED] Use $XDG_DATA_HOME on macOS if it is set. #367

Closed
opened 2026-02-25 22:33:17 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/FiloSottile/mkcert/pull/40
Author: @lgarron
Created: 7/6/2018
Status: Merged
Merged: 7/7/2018
Merged by: @FiloSottile

Base: masterHead: xdg-data-home-macOS


📝 Commits (1)

  • 92338fc Use $XDG_DATA_HOME on macOS if it is set.

📊 Changes

1 file changed (+5 additions, -6 deletions)

View changed files

📝 main.go (+5 -6)

📄 Description

I was a little surprised to see mkcert use ~/Library/Application Support instead of $XDG_DATA_HOME until I looked at the code and see it was intentional choice.

I personally think it would be good to follow the XDG spec fully and default to ~/.local/share on macOS – rather than introducing custom behaviour – but it's ultimately up to you.

This PR offers a compromise, using $XDG_DATA_HOME if set, if you'd be okay with that. :-)
(I explicitly set XDG config vars in my shell, in order to try to get as many programs to use the same data storage structure as possible.)


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/FiloSottile/mkcert/pull/40 **Author:** [@lgarron](https://github.com/lgarron) **Created:** 7/6/2018 **Status:** ✅ Merged **Merged:** 7/7/2018 **Merged by:** [@FiloSottile](https://github.com/FiloSottile) **Base:** `master` ← **Head:** `xdg-data-home-macOS` --- ### 📝 Commits (1) - [`92338fc`](https://github.com/FiloSottile/mkcert/commit/92338fcc365f85045045b18ff58a7b5c373f921c) Use $XDG_DATA_HOME on macOS if it is set. ### 📊 Changes **1 file changed** (+5 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `main.go` (+5 -6) </details> ### 📄 Description I was a little surprised to see `mkcert` use `~/Library/Application Support` instead of `$XDG_DATA_HOME` until I looked at the code and see it was intentional choice. I personally think it would be good to follow the XDG spec fully and default to `~/.local/share` on macOS – rather than introducing custom behaviour – but it's ultimately up to you. This PR offers a compromise, using `$XDG_DATA_HOME` if set, if you'd be okay with that. :-) (I explicitly set XDG config vars in my shell, in order to try to get as many programs to use the same data storage structure as possible.) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-25 22:33:17 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/mkcert#367
No description provided.