-
Notifications
You must be signed in to change notification settings - Fork 66
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
fix: utils/utils.go: fix create boilerplate directoy to current working directory on Windows and refs other XDG_DATA_HOME and LOCALAPPDATA #62
fix: utils/utils.go: fix create boilerplate directoy to current working directory on Windows and refs other XDG_DATA_HOME and LOCALAPPDATA #62
Conversation
On Windows, create boiler plate directory to current working directory. move this directory to LOCALAPPDATA directory add: utils/utils.go: boiler plate directory refs "XDG_DATA_HOME" create boiler directory under the XDG_DATA_HOME directory, if your os set set XDG Base directory. add: .editorconfig: editor tab setting file for go source edit.
utils/utils.go
Outdated
|
||
override = os.Getenv("XDG_DATA_HOME") | ||
if len(override) > 0 { | ||
return filepath.Join(override, "gibo", gitignoreDir) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the drive-by review, but I'd like to point out that directories in $XDG_DATA_HOME
, $XDG_CONFIG_HOME
, etc. should not be hidden. So it should be something like path.join(XDG_DATA_HOME, 'gibo', 'gitignore-boilerplates')
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you so match for this quick review.
I change PR to boilerplates directory is not hidden in XDG Base Directories and LOCALAPPDATA.
Hi @atsushifx! Thank you for contributing to gibo. And special thanks for contributing to gibo on Windows. Can you please remove the editorconfig file from this PR and raise that as a separate PR? I'd like to merge your home dir fix, but I'd also like to think about the editorconfig change a bit more before merging that one. |
I understood. I make new commit "remove editor config", then this PR have only utils/utils.go file. |
Hey @atsushifx... I thought you'd like to know, I was inspired by your PR to also store the boilerplates in the right place on MacOS too (i.e. |
I read this commit, and I want to make 2 sugesstions.
|
On Windows, create boiler plate directory to current working directory.
move this directory to LOCALAPPDATA directory
ref
add: utils/utils.go: boiler plate directory refs "XDG_DATA_HOME"
create boiler directory under the XDG_DATA_HOME directory,
if your os set set XDG Base directory.
add: .editorconfig:
editor tab setting file for go source edit.