cli/init: Canonicalize path before comparison

On Windows, this comparison would fail otherwise.
This commit is contained in:
Lorenz Leutgeb
2026-02-10 10:00:16 +00:00
committed by Fintan Halpenny
parent ffbbb374c1
commit fefa28372d
+1 -1
View File
@@ -192,7 +192,7 @@ pub fn init(repo: git::Repository, args: Args, profile: &profile::Profile) -> an
term::format::dim("(RID)"),
term::format::highlight(rid.urn())
);
let directory = if path == env::current_dir()? {
let directory = if path == dunce::canonicalize(env::current_dir()?)? {
"this directory".to_owned()
} else {
term::format::tertiary(path.display()).to_string()