Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: don't fail on canonicalize #7094

Merged
merged 1 commit into from
Feb 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading