Skip to content

Commit

Permalink
fix nightly build for windows
Browse files Browse the repository at this point in the history
  • Loading branch information
mattwparas committed Nov 4, 2024
1 parent 4ae45aa commit 3f34854
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions crates/steel-core/src/compiler/modules.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2741,6 +2741,13 @@ impl<'a> ModuleBuilder<'a> {
// for windows if a unix path is provided
if cfg!(target_os = "windows") {
let mut result = x.trim_start_matches("/").to_string();

let mut iter = result.chars();
iter.next();
if matches!(iter.next(), Some(':')) {
return PathBuf::from(result);
}

result.insert(1, ':');
return PathBuf::from(result);
}
Expand Down

0 comments on commit 3f34854

Please sign in to comment.