Skip to content

Commit 596d4d9

Browse files
committed
Fix Windows
1 parent 1df6d5a commit 596d4d9

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

rewatch/src/helpers.rs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,10 +189,15 @@ pub fn get_bin_dir() -> PathBuf {
189189
}
190190

191191
pub fn get_bsc() -> PathBuf {
192-
match std::env::var("RESCRIPT_BSC_EXE") {
192+
let bsc_path = match std::env::var("RESCRIPT_BSC_EXE") {
193193
Ok(val) => PathBuf::from(val),
194194
Err(_) => get_bin_dir().join("bsc.exe"),
195-
}
195+
};
196+
197+
bsc_path
198+
.canonicalize()
199+
.expect("Could not get bsc path")
200+
.to_stripped_verbatim_path()
196201
}
197202

198203
pub fn get_rescript_legacy(root_path: &Path, workspace_root: Option<PathBuf>) -> PathBuf {

rewatch/tests/get_bin_paths.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
// @ts-check
22
import { bsc_exe } from '../../cli/common/bins.js';
33

4-
console.log(`RESCRIPT_BSC_EXE=${bsc_exe}`);
4+
console.log(`RESCRIPT_BSC_EXE='${bsc_exe}'`);

0 commit comments

Comments
 (0)