Skip to content

Commit 4d2d130

Browse files
committed
Try to fix Windows
1 parent 0251cff commit 4d2d130

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

rewatch/src/helpers.rs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,9 +189,17 @@ pub fn get_bin_dir() -> PathBuf {
189189
}
190190

191191
pub fn get_bsc() -> PathBuf {
192-
match std::env::var("RESCRIPT_BSC_EXE") {
192+
let path = match std::env::var("RESCRIPT_BSC_EXE") {
193193
Ok(val) => PathBuf::from(val),
194194
Err(_) => get_bin_dir().join("bsc.exe"),
195+
};
196+
197+
match path
198+
.canonicalize()
199+
.map(StrippedVerbatimPath::to_stripped_verbatim_path)
200+
{
201+
Ok(path) => path,
202+
Err(_) => panic!("Could not find bsc.exe"),
195203
}
196204
}
197205

0 commit comments

Comments
 (0)