Skip to content
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

Use XDG_CACHE_HOME as download path #28

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

vbrandl
Copy link
Member

@vbrandl vbrandl commented Nov 24, 2019

This fixes the problems described in #27

  • no more problems with non-writable download directories (except if a non-writable XDG_CACHE_HOME is configured, which makes no sense)
  • it is possible to run multiple versions of the downloader/checker without path conflicts
  • the downloader 'detects' if it has been updated but the downloaded checker is an older version
  • the OS/user knows what files are not required for the downloader to work and can be removed safely (when running again, it will be rewritten to the cache, but that's how caches work)

On my system with the default XDG settings (XDG_CACHE_HOME=$HOME/.cache), the checker is stored as $HOME/.cache/editorconfig-checker/2.0.3/bin/ec-linux-amd64

Running XDG_CACHE_HOME=$HOME/.cache2 cargo run stores the binary in $HOME/.cache2/editorconfig-checker/2.0.3/bin/ec-linux-amd64, as expected.

Actually all the other editorconfig-checker.* projects might (should?) use this pattern, too (one might discuss the details about how the path should be structured) so different downloaders can share the already downloaded checker.

Closes #27

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.

Download Path
1 participant