Skip to content

fix(config): use standard user directories - #306

Closed
efegokdemir wants to merge 1 commit into
cli:trunkfrom
efegokdemir:codex/issue-195-user-dirs
Closed

efegokdemir wants to merge 1 commit into
cli:trunkfrom
efegokdemir:codex/issue-195-user-dirs

Conversation

@efegokdemir

Copy link
Copy Markdown

Summary

Closes #195 by using Go standard-library user directory discovery for configuration and cache paths.

Changes

  • Preserve GH_CONFIG_DIR as the explicit override.
  • Use os.UserConfigDir for the default configuration root.
  • Use os.UserCacheDir for the default cache root.
  • Preserve the existing gh and GitHub CLI subdirectory conventions and temporary-cache fallback.
  • Update platform-aware tests for the standard directory locations.
  • No new dependencies.

Testing

  • go test ./... — passed.
  • go test -race ./... — passed.
  • go vet ./... — passed.
  • git diff --check — passed.

Notes

No competing open PR for #195 was found before implementation. AI assistance was used; I reviewed the complete diff and am responsible for the submitted change. golangci-lint reports four pre-existing baseline issues in unrelated files: two govet inline warnings in accessibility_test.go and two staticcheck deprecations for Transport.Dial and DialTLS in http_client.go.

Signed-off-by: Efe Gökdemir <efe@rexcode.co.uk>
@BagToad BagToad closed this Sep 23, 2026
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.

Use UserCacheDir and UserConfigDir instead of custom implementation

2 participants