This repository was archived by the owner on May 15, 2025. It is now read-only.

Description
The downloader loads the checker in the same directory as the downloader executable. This creates two problems:
- The downloader might be located in a non-writable directory (at least for the user, e.g.
/usr/bin, or inside the nix store). If this is the case, the downloader will fail with an IO error
- There might be multiple binaries of the downloader in the system and each one will download the checker itself. This creates unnecessary traffic and takes more disk space
I propose to download the checker into $XDG_CACHE_HOME/editorconfig-checker/ec-${version}
This gives us a few more advantages:
The current state of the downloader does not store the version number of the checker binary but just checks if any ec binary exists. If you run v2.0.3 of the downloader it will download v2.0.3 of the checker but if the loader gets updated to 2.0.4, there is no (easy) way to determine if the already existing binary is also v2.0.4. If the checker is stored as $XDG_CACHE_HOME/editorconfig-checker/ec-${version}, we can determine if we need to download a new version of the checker.
Also this allows using multiple versions of the downloader and checker at the same time without any conflicts