From f33bd2fecc449b2bc97512faa70a2edba8dedeb9 Mon Sep 17 00:00:00 2001 From: Erik Krogh Kristensen Date: Tue, 31 May 2022 10:25:48 +0000 Subject: [PATCH] attempt to fix Windows --- ruby/autobuilder/src/main.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ruby/autobuilder/src/main.rs b/ruby/autobuilder/src/main.rs index 496c34a0594..abb936edbdd 100644 --- a/ruby/autobuilder/src/main.rs +++ b/ruby/autobuilder/src/main.rs @@ -41,6 +41,10 @@ fn main() -> std::io::Result<()> { // converts the relative path `stripped` to an absolute path by prepending the working directory fn absolutelyfy(stripped: &str) -> String { let pwd = env::current_dir().unwrap(); - - pwd.join(stripped).into_os_string().into_string().unwrap() + let path = pwd.join(stripped).into_os_string().into_string().unwrap(); + if env::consts::OS == "windows" { + path.replace("\\", "/") + } else { + path + } }