Skip to content

Commit 135048c

Browse files
fix: create TCLI_HOME if it does not exist
1 parent ae6de7f commit 135048c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/main.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@ pub static TCLI_HOME: Lazy<PathBuf> = Lazy::new(|| {
4242

4343
#[tokio::main]
4444
async fn main() -> Result<(), Error> {
45+
if !TCLI_HOME.is_dir() {
46+
std::fs::create_dir_all(TCLI_HOME.as_path())?;
47+
}
48+
4549
match Args::parse().commands {
4650
Commands::Init {
4751
command,

0 commit comments

Comments
 (0)