Skip to content

Commit 1fcde23

Browse files
committed
propagate bsc path
1 parent 8925187 commit 1fcde23

File tree

4 files changed

+7
-3
lines changed

4 files changed

+7
-3
lines changed

rewatch/src/build.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ pub fn get_compiler_args(
7373
rescript_version
7474
} else {
7575
let bsc_path = match bsc_path {
76-
Some(bsc_path) => bsc_path,
76+
Some(bsc_path) => helpers::get_abs_path(&bsc_path),
7777
None => helpers::get_bsc(&package_root, workspace_root.to_owned()),
7878
};
7979
helpers::get_rescript_version(&bsc_path)

rewatch/src/build/clean.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ pub fn clean(path: &str, show_progress: bool, bsc_path: Option<String>) -> Resul
344344
let packages = packages::make(&None, &project_root, &workspace_root, show_progress)?;
345345
let root_config_name = packages::read_package_name(&project_root)?;
346346
let bsc_path = match bsc_path {
347-
Some(bsc_path) => bsc_path,
347+
Some(bsc_path) => helpers::get_abs_path(&bsc_path),
348348
None => helpers::get_bsc(&project_root, workspace_root.to_owned()),
349349
};
350350

rewatch/src/main.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@ fn main() -> Result<()> {
149149
args.after_build,
150150
args.create_sourcedirs,
151151
args.dev,
152+
args.bsc_path,
152153
);
153154

154155
Ok(())

rewatch/src/watcher.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,10 @@ async fn async_watch(
5454
after_build: Option<String>,
5555
create_sourcedirs: bool,
5656
build_dev_deps: bool,
57+
bsc_path: Option<String>,
5758
) -> notify::Result<()> {
5859
let mut build_state =
59-
build::initialize_build(None, filter, show_progress, path, None).expect("Can't initialize build");
60+
build::initialize_build(None, filter, show_progress, path, bsc_path).expect("Can't initialize build");
6061
let mut needs_compile_type = CompileType::Incremental;
6162
// create a mutex to capture if ctrl-c was pressed
6263
let ctrlc_pressed = Arc::new(Mutex::new(false));
@@ -259,6 +260,7 @@ pub fn start(
259260
after_build: Option<String>,
260261
create_sourcedirs: bool,
261262
build_dev_deps: bool,
263+
bsc_path: Option<String>,
262264
) {
263265
futures::executor::block_on(async {
264266
let queue = Arc::new(FifoQueue::<Result<Event, Error>>::new());
@@ -279,6 +281,7 @@ pub fn start(
279281
after_build,
280282
create_sourcedirs,
281283
build_dev_deps,
284+
bsc_path,
282285
)
283286
.await
284287
{

0 commit comments

Comments
 (0)