Skip to content

Commit

Permalink
test: don't fail on canonicalize (#7094)
Browse files Browse the repository at this point in the history
  • Loading branch information
DaniPopes authored Feb 12, 2024
1 parent 79d2de6 commit 74b12ee
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions crates/test-utils/src/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -613,8 +613,8 @@ impl TestProject {

/// Returns the path to the forge executable.
pub fn forge_bin(&self) -> Command {
let forge = self.exe_root.join("../forge").with_extension(env::consts::EXE_SUFFIX);
let forge = forge.canonicalize().unwrap();
let forge = self.exe_root.join(format!("../forge{}", env::consts::EXE_SUFFIX));
let forge = forge.canonicalize().unwrap_or_else(|_| forge.clone());
let mut cmd = Command::new(forge);
cmd.current_dir(self.inner.root());
// disable color output for comparisons
Expand All @@ -624,8 +624,8 @@ impl TestProject {

/// Returns the path to the cast executable.
pub fn cast_bin(&self) -> Command {
let cast = self.exe_root.join("../cast").with_extension(env::consts::EXE_SUFFIX);
let cast = cast.canonicalize().unwrap();
let cast = self.exe_root.join(format!("../cast{}", env::consts::EXE_SUFFIX));
let cast = cast.canonicalize().unwrap_or_else(|_| cast.clone());
let mut cmd = Command::new(cast);
// disable color output for comparisons
cmd.env("NO_COLOR", "1");
Expand Down

0 comments on commit 74b12ee

Please sign in to comment.