Skip to content

Commit 1f048b2

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

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

rewatch/src/helpers.rs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,8 +190,15 @@ pub fn get_bin_dir() -> PathBuf {
190190

191191
pub fn get_bsc() -> PathBuf {
192192
match std::env::var("RESCRIPT_BSC_EXE") {
193-
Ok(val) => PathBuf::from(val),
194-
Err(_) => get_bin_dir().join("bsc.exe"),
193+
Ok(val) => get_abs_path(&PathBuf::from(val)),
194+
Err(_) => match get_bin_dir()
195+
.join("bsc.exe")
196+
.canonicalize()
197+
.map(StrippedVerbatimPath::to_stripped_verbatim_path)
198+
{
199+
Ok(path) => path,
200+
Err(_) => panic!("Could not find bsc.exe"),
201+
},
195202
}
196203
}
197204

0 commit comments

Comments
 (0)