forked from rust-lang/cargo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make Cargo obey platform-specific directory standards
Strategy for backward-compatiblity: When checking for the relevant Cargo directories, check in the following order of preference: 1) Use the environment variable `CARGO_HOME`. 2) Use the platform-specific directories if they exist. 3) Use the legacy location (~/.cargo) if it exists. 4) Fall back to the platform-specific directories if everything else fails. The new platform-specific directories are as follows: On Windows, use `AppData\Local\Temp\Cargo` for cache files (obtained via `GetTempPath`), `AppData\Roaming\Cargo` for the config files (`FOLDERID_RoamingAppData`) and `AppData\Local\Programs\Cargo` for installed binaries (`FOLDERID_UserProgramFiles`). On Unixy systems, use the XDG spec: `~/.cache/cargo` for cache files, `~/.config/cargo` for config, `~/.local/bin` for installed binaries. http://standards.freedesktop.org/basedir-spec/basedir-spec-0.8.html http://www.freedesktop.org/software/systemd/man/file-hierarchy.html On OS X, use `~/Library/Caches/Cargo` for cache files, `~/Library/Cargo` for config files and `~/Library/Cargo/bin` for binary files. Fixes rust-lang#1734. Fixes rust-lang#1976.
- Loading branch information
Showing
6 changed files
with
172 additions
and
47 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.