From 8159cda7bc72a5a579e3a1795a407761eb41f7cd Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Tue, 15 Feb 2022 10:38:20 -0600 Subject: [PATCH] Try to fix CI (#659) Looks like this is related to the changes in `Command` on Windows done awhile back in the standard library. --- tests/support/mod.rs | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/tests/support/mod.rs b/tests/support/mod.rs index cde930e9..f3c04405 100644 --- a/tests/support/mod.rs +++ b/tests/support/mod.rs @@ -62,13 +62,12 @@ impl Test { } pub fn shim(&self, name: &str) -> &Test { - link_or_copy( - &self.gcc, - self.td - .path() - .join(&format!("{}{}", name, env::consts::EXE_SUFFIX)), - ) - .unwrap(); + let name = if name.ends_with(env::consts::EXE_SUFFIX) { + name.to_string() + } else { + format!("{}{}", name, env::consts::EXE_SUFFIX) + }; + link_or_copy(&self.gcc, self.td.path().join(name)).unwrap(); self }