Skip to content

Commit 944d91b

Browse files
committed
Log warning if runtime path couldn't be determined
1 parent cd7b499 commit 944d91b

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

rewatch/src/build.rs

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,13 @@ pub fn get_compiler_args(rescript_file_path: &Path) -> Result<String> {
9090
PathBuf::from(&interface_filename).exists()
9191
};
9292

93-
let runtime_path = helpers::get_runtime_path(&project_context).ok();
93+
let runtime_path = match helpers::get_runtime_path(&project_context) {
94+
Ok(path) => Some(path),
95+
Err(_) => {
96+
println!("Warning: could not determine runtime path");
97+
None
98+
}
99+
};
94100

95101
let compiler_args = compile::compiler_args(
96102
&project_context.current_config,
@@ -160,7 +166,13 @@ pub fn initialize_build(
160166
let _ = stdout().flush();
161167
}
162168

163-
let runtime_path = helpers::get_runtime_path(&project_context).ok();
169+
let runtime_path = match helpers::get_runtime_path(&project_context) {
170+
Ok(path) => Some(path),
171+
Err(_) => {
172+
println!("Warning: could not determine runtime path");
173+
None
174+
}
175+
};
164176

165177
let mut build_state = BuildState::new(project_context, packages, bsc_path, runtime_path);
166178
packages::parse_packages(&mut build_state);

0 commit comments

Comments
 (0)