From 6cd5ae7b5fe49ea6bd039b432d26fb7053d3b9d9 Mon Sep 17 00:00:00 2001 From: Airyzz <36567925+Airyzz@users.noreply.github.com> Date: Fri, 20 Dec 2024 10:30:37 +1030 Subject: [PATCH] convert windows unc paths to regular paths --- Cargo.lock | 1 + Cargo.toml | 1 + src/cli/mod.rs | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Cargo.lock b/Cargo.lock index a93465b..a222702 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -327,6 +327,7 @@ version = "0.1.0" dependencies = [ "clap", "colored", + "dunce", "enum_dispatch", "include_directory", "indexmap 2.6.0", diff --git a/Cargo.toml b/Cargo.toml index db9860c..97caa34 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,6 +14,7 @@ strip = true # Remove debug symbols [dependencies] clap = { version = "4.5.20", features=["derive"] } +dunce = "1.0.5" enum_dispatch = "0.3.13" include_directory = "0.1.1" indexmap = { version = "2.6.0", features = ["serde"] } diff --git a/src/cli/mod.rs b/src/cli/mod.rs index 653241d..53ebef5 100644 --- a/src/cli/mod.rs +++ b/src/cli/mod.rs @@ -50,7 +50,7 @@ fn get_project_manifest_path(cli: &CLI) -> PathBuf { let mut test_path_2 = PathBuf::from(path); test_path_2.push("manifest.yaml"); for path in vec![test_path, test_path_2].iter() { - let path = std::fs::canonicalize(path); + let path = dunce::canonicalize(path); match path { Ok(path) => { info!("Checking path: {}", path.to_str().unwrap());