Skip to content

Commit 92bd81c

Browse files
committed
Don't clean rescript repo runtime
1 parent 1353e65 commit 92bd81c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

rewatch/src/build/clean.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,10 @@ pub fn clean(path: &Path, show_progress: bool, snapshot_output: bool, build_dev_
375375

376376
let path_str = package.get_ocaml_build_path();
377377
let path = std::path::Path::new(&path_str);
378-
let _ = std::fs::remove_dir_all(path);
378+
// This is hacky check that the runtime is not cleaned for rescript repository
379+
if package.name != "rescript" {
380+
let _ = std::fs::remove_dir_all(path);
381+
}
379382
});
380383
let timing_clean_compiler_assets_elapsed = timing_clean_compiler_assets.elapsed();
381384

0 commit comments

Comments
 (0)