Skip to content

Commit 8afda36

Browse files
committed
Try again
1 parent ffe2b74 commit 8afda36

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

rewatch/src/helpers.rs

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -189,17 +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) => 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-
},
202-
}
194+
Err(_) => get_bin_dir().join("bsc.exe"),
195+
};
196+
197+
bsc_path
198+
.canonicalize()
199+
.expect("Could not find bsc.exe")
200+
.to_stripped_verbatim_path()
203201
}
204202

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

0 commit comments

Comments
 (0)