mirror of
https://github.com/gitui-org/gitui
synced 2026-05-24 09:28:21 +00:00
Set MacOS config directory to ~/.config (#379)
This commit is contained in:
parent
be3a33e862
commit
b5411e28a5
3 changed files with 8 additions and 3 deletions
|
|
@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||||
### Fixed
|
### Fixed
|
||||||
- compilation broken on freebsd ([#461](https://github.com/extrawurst/gitui/issues/461))
|
- compilation broken on freebsd ([#461](https://github.com/extrawurst/gitui/issues/461))
|
||||||
- don’t fail if `user.name` is not set [[@cruessler](https://github.com/cruessler)] ([#79](https://github.com/extrawurst/gitui/issues/79)) ([#228](https://github.com/extrawurst/gitui/issues/228))
|
- don’t fail if `user.name` is not set [[@cruessler](https://github.com/cruessler)] ([#79](https://github.com/extrawurst/gitui/issues/79)) ([#228](https://github.com/extrawurst/gitui/issues/228))
|
||||||
|
- set MacOS config directory to ~/.config [[@remique](https://github.com/remique)] ([#317](https://github.com/extrawurst/gitui/issues/317))
|
||||||
|
|
||||||
## [0.11.0] - 2020-12-20
|
## [0.11.0] - 2020-12-20
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ This file allows changing every key binding.
|
||||||
|
|
||||||
The config file format based on the [Ron file format](https://github.com/ron-rs/ron).
|
The config file format based on the [Ron file format](https://github.com/ron-rs/ron).
|
||||||
The location of the file depends on your OS:
|
The location of the file depends on your OS:
|
||||||
* `$HOME/Library/Application Support/gitui/key_config.ron` (mac)
|
* `$HOME/.config/gitui/key_config.ron` (mac)
|
||||||
* `$XDG_CONFIG_HOME/gitui/key_config.ron` (linux using XDG)
|
* `$XDG_CONFIG_HOME/gitui/key_config.ron` (linux using XDG)
|
||||||
* `$HOME/.config/gitui/key_config.ron` (linux)
|
* `$HOME/.config/gitui/key_config.ron` (linux)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -244,8 +244,12 @@ fn get_app_cache_path() -> Result<PathBuf> {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn get_app_config_path() -> Result<PathBuf> {
|
fn get_app_config_path() -> Result<PathBuf> {
|
||||||
let mut path = dirs_next::config_dir()
|
let mut path = if cfg!(target_os = "macos") {
|
||||||
.ok_or_else(|| anyhow!("failed to find os config dir."))?;
|
dirs_next::home_dir().map(|h| h.join(".config"))
|
||||||
|
} else {
|
||||||
|
dirs_next::config_dir()
|
||||||
|
}
|
||||||
|
.ok_or_else(|| anyhow!("failed to find os config dir."))?;
|
||||||
|
|
||||||
path.push("gitui");
|
path.push("gitui");
|
||||||
fs::create_dir_all(&path)?;
|
fs::create_dir_all(&path)?;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue