Closed merikan closed 1 year ago
If you open up a terminal and run echo $XDG_CONFIG_HOME
, what is returned?
Hi
I get the expected output /Users/peter/.config
. I am using XDG for most of my tools in my terminal, so it's not a xdg problem.
If one looks at the implementation of os#UserConfigDir
it only uses XDG_
for the Unix os and it also says so in the godoc, but it is easy to miss.
There is an issue where they discuss this and they chose not to change anything since it would be a breaking change. Sadly, no warning text was written, so unfortunately it is used and the meaning is misinterpreted.
To not make it a breaking change I've fixed it so it will look is tut exists in os.UserConfigDir and if it does it will use that location. But if you move that folder to XDG_CONFIG_HOME it will use that path instead.
I'll include it in the next release :)
It's now released. Please check if it works as intended, if it doesn't reopen this issue :)
Can confirm that it works as expected. Awesome!!
Thanks for a great project
When using
tut
on Macos the variableXDG_CONFIG_HOME
is not respected by Go and it always returns$HOME/Library/Application Support/tut
which is not what you might expect in the terminal. The packagegithub.com/adrg/xdg
translates XDG variables in a way that you would expect.I understand that this type of change isn't backward compatible so a small note about it in the documentation could be enough