From 18767f07f3ca4f05256e350cdbbdbcda25bbccf4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oddbj=C3=B8rn=20Gr=C3=B8dem?= <29732646+oddgrd@users.noreply.github.com> Date: Tue, 13 Dec 2022 14:24:45 +0100 Subject: [PATCH] feat: canonicalize before trace (#531) --- cargo-shuttle/src/lib.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cargo-shuttle/src/lib.rs b/cargo-shuttle/src/lib.rs index 761ebd6a6..18174a457 100644 --- a/cargo-shuttle/src/lib.rs +++ b/cargo-shuttle/src/lib.rs @@ -641,12 +641,13 @@ impl Shuttle { if let Ok(repo) = Repository::discover(working_directory) { let repo_path = repo .workdir() - .context("getting working directory of repository")?; + .context("getting working directory of repository")? + .canonicalize()?; trace!(?repo_path, "found git repository"); let repo_rel_path = working_directory - .strip_prefix(repo_path) + .strip_prefix(repo_path.as_path()) .context("stripping repository path from working directory")?; trace!(