From f4d0a020fb65503764c659dc66c8a5c88822f233 Mon Sep 17 00:00:00 2001 From: Linfeng Qian Date: Fri, 2 Sep 2022 17:36:02 +0800 Subject: [PATCH 1/2] fix: always create .ckb-cli directory when start --- src/main.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main.rs b/src/main.rs index 37306e42..23261e36 100644 --- a/src/main.rs +++ b/src/main.rs @@ -62,9 +62,6 @@ fn main() -> Result<(), io::Error> { let ckb_cli_dir = if let Some(dir_string) = env_map.remove("CKB_CLI_HOME") { let dir = PathBuf::from(dir_string.as_str()); - if !dir.exists() { - fs::create_dir_all(&dir)?; - } if dir.exists() && !dir.is_dir() { return Err(io::Error::new( io::ErrorKind::InvalidInput, @@ -77,6 +74,9 @@ fn main() -> Result<(), io::Error> { dir.push(".ckb-cli"); dir }; + if !ckb_cli_dir.exists() { + fs::create_dir_all(&ckb_cli_dir)?; + } let mut config = GlobalConfig::new(ckb_url_opt.clone(), ckb_indexer_url_opt.clone()); let mut config_file = ckb_cli_dir.clone(); From 13867c2419167040a1a5c8f045190bb1270ea5b6 Mon Sep 17 00:00:00 2001 From: Linfeng Qian Date: Fri, 2 Sep 2022 17:40:57 +0800 Subject: [PATCH 2/2] chore: bump up to v1.1.1 --- Cargo.lock | 2 +- Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index f459da5b..60f3694e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -389,7 +389,7 @@ dependencies = [ [[package]] name = "ckb-cli" -version = "1.1.0" +version = "1.1.1" dependencies = [ "ansi_term", "atty", diff --git a/Cargo.toml b/Cargo.toml index 3ac43497..0e8b558c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ckb-cli" -version = "1.1.0" +version = "1.1.1" license = "MIT" authors = ["Linfeng Qian ", "Nervos Core Dev "] edition = "2021"