mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
Use dirs-next
instead of dirs
This commit is contained in:
parent
10536f024d
commit
6c0f7a736f
3 changed files with 38 additions and 18 deletions
50
Cargo.lock
generated
50
Cargo.lock
generated
|
@ -721,27 +721,28 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
checksum = "3fd78930633bd1c6e35c4b42b1df7b0cbc6bc191146e512bb3bedf243fcc3901"
|
||||
dependencies = [
|
||||
"libc",
|
||||
"redox_users",
|
||||
"redox_users 0.3.5",
|
||||
"winapi 0.3.9",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "dirs"
|
||||
version = "3.0.1"
|
||||
name = "dirs-next"
|
||||
version = "2.0.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "142995ed02755914747cc6ca76fc7e4583cd18578746716d0508ea6ed558b9ff"
|
||||
checksum = "b98cf8ebf19c3d1b223e151f99a4f9f0690dca41414773390fc824184ac833e1"
|
||||
dependencies = [
|
||||
"dirs-sys",
|
||||
"cfg-if 1.0.0",
|
||||
"dirs-sys-next",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "dirs-sys"
|
||||
version = "0.3.5"
|
||||
name = "dirs-sys-next"
|
||||
version = "0.1.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8e93d7f5705de3e49895a2b5e0b8855a1c27f080192ae9c32a6432d50741a57a"
|
||||
checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d"
|
||||
dependencies = [
|
||||
"libc",
|
||||
"redox_users",
|
||||
"redox_users 0.4.0",
|
||||
"winapi 0.3.9",
|
||||
]
|
||||
|
||||
|
@ -1503,7 +1504,7 @@ dependencies = [
|
|||
"cloudabi",
|
||||
"instant",
|
||||
"libc",
|
||||
"redox_syscall",
|
||||
"redox_syscall 0.1.57",
|
||||
"smallvec",
|
||||
"winapi 0.3.9",
|
||||
]
|
||||
|
@ -1824,6 +1825,15 @@ version = "0.1.57"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "41cc0f7e4d5d4544e8861606a285bb08d3e70712ccc7d2b84d7c0ccfaf4b05ce"
|
||||
|
||||
[[package]]
|
||||
name = "redox_syscall"
|
||||
version = "0.2.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8270314b5ccceb518e7e578952f0b72b88222d02e8f77f5ecf7abbb673539041"
|
||||
dependencies = [
|
||||
"bitflags",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "redox_users"
|
||||
version = "0.3.5"
|
||||
|
@ -1831,10 +1841,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
checksum = "de0737333e7a9502c789a36d7c7fa6092a49895d4faa31ca5df163857ded2e9d"
|
||||
dependencies = [
|
||||
"getrandom 0.1.15",
|
||||
"redox_syscall",
|
||||
"redox_syscall 0.1.57",
|
||||
"rust-argon2",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "redox_users"
|
||||
version = "0.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "528532f3d801c87aec9def2add9ca802fe569e44a544afe633765267840abe64"
|
||||
dependencies = [
|
||||
"getrandom 0.2.2",
|
||||
"redox_syscall 0.2.6",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "regex"
|
||||
version = "1.4.2"
|
||||
|
@ -2103,7 +2123,7 @@ checksum = "2c29947abdee2a218277abeca306f25789c938e500ea5a9d4b12a5a504466902"
|
|||
dependencies = [
|
||||
"cfg-if 1.0.0",
|
||||
"libc",
|
||||
"redox_syscall",
|
||||
"redox_syscall 0.1.57",
|
||||
"winapi 0.3.9",
|
||||
]
|
||||
|
||||
|
@ -2227,7 +2247,7 @@ dependencies = [
|
|||
"assert_cmd",
|
||||
"atty",
|
||||
"config",
|
||||
"dirs 3.0.1",
|
||||
"dirs-next",
|
||||
"env_logger",
|
||||
"log",
|
||||
"nom 6.1.2",
|
||||
|
@ -2275,7 +2295,7 @@ dependencies = [
|
|||
"cfg-if 0.1.10",
|
||||
"libc",
|
||||
"rand 0.7.3",
|
||||
"redox_syscall",
|
||||
"redox_syscall 0.1.57",
|
||||
"remove_dir_all",
|
||||
"winapi 0.3.9",
|
||||
]
|
||||
|
@ -2287,7 +2307,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
checksum = "edd106a334b7657c10b7c540a0106114feadeb4dc314513e97df481d5d966f42"
|
||||
dependencies = [
|
||||
"byteorder",
|
||||
"dirs 1.0.5",
|
||||
"dirs",
|
||||
"winapi 0.3.9",
|
||||
]
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ name = "taskchampion-cli"
|
|||
version = "0.3.0"
|
||||
|
||||
[dependencies]
|
||||
dirs = "^3.0.1"
|
||||
dirs-next = "^2.0.0"
|
||||
env_logger = "^0.8.3"
|
||||
anyhow = "1.0"
|
||||
log = "^0.4.14"
|
||||
|
|
|
@ -37,7 +37,7 @@ pub(crate) fn default_settings() -> anyhow::Result<Config> {
|
|||
let mut settings = Config::default();
|
||||
|
||||
// set up defaults
|
||||
if let Some(dir) = dirs::data_local_dir() {
|
||||
if let Some(dir) = dirs_next::data_local_dir() {
|
||||
let mut tc_dir = dir.clone();
|
||||
tc_dir.push("taskchampion");
|
||||
settings.set_default(
|
||||
|
@ -71,7 +71,7 @@ pub(crate) fn read_settings() -> anyhow::Result<Config> {
|
|||
let config_file: File<FileSourceFile> = config_file.into();
|
||||
settings.merge(config_file.required(true))?;
|
||||
env::remove_var("TASKCHAMPION_CONFIG");
|
||||
} else if let Some(mut dir) = dirs::config_dir() {
|
||||
} else if let Some(mut dir) = dirs_next::config_dir() {
|
||||
dir.push("taskchampion");
|
||||
log::debug!("Loading configuration from {:?} (optional)", dir);
|
||||
let config_file: File<FileSourceFile> = dir.into();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue