cli/init: Canonicalize path before comparison

On Windows, this comparison would fail otherwise.
This commit is contained in:
Lorenz Leutgeb 2026-02-08 12:02:01 +01:00 committed by Fintan Halpenny
parent ffbbb374c1
commit fefa28372d
1 changed files with 1 additions and 1 deletions

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()