Skip to content

Conversation

@yeskunall
Copy link
Contributor

This change will check if XDG_DATA_HOME is set and use it iff GORE_HOME is not set already. If neither are set, it will fallback to HOME.

LMK if I did something wrong and I’ll work to fix it. Thanks for reviewing my PR!

Closes #230.


💖

gore.go Outdated
baseDir = os.Getenv("XDG_DATA_HOME")

if baseDir != "" {
folderName = "gore"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I prefer returning filepath.Join(baseDir, "gore") here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. Please take a look when you can.

Copy link
Collaborator

@itchyny itchyny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks.

@itchyny itchyny merged commit 8e517a8 into x-motemen:main Jun 21, 2025
5 of 6 checks passed
@yeskunall yeskunall deleted the 230-respect-xdg-spec branch June 21, 2025 11:55
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.

REPL should respect user’s XDG base directory settings

2 participants