Skip to content

Commit 4e14f90

Browse files
committed
update
1 parent 8a84839 commit 4e14f90

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/rs_lib/lib.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ use std::path::PathBuf;
66
use std::rc::Rc;
77
use std::sync::Arc;
88

9+
use anyhow::Context;
910
use anyhow::bail;
1011
use deno_ast::ModuleKind;
1112
use deno_cache_dir::file_fetcher::CacheSetting;
@@ -166,7 +167,10 @@ impl DenoWorkspace {
166167
let config_discovery = if options.no_config.unwrap_or_default() {
167168
ConfigDiscoveryOption::Disabled
168169
} else if let Some(config_path) = options.config_path {
169-
ConfigDiscoveryOption::Path(resolve_absolute_path(config_path, &cwd)?)
170+
ConfigDiscoveryOption::Path(
171+
resolve_absolute_path(config_path, &cwd)
172+
.context("Failed resolving config path.")?,
173+
)
170174
} else {
171175
ConfigDiscoveryOption::DiscoverCwd
172176
};
@@ -774,7 +778,7 @@ fn resolve_absolute_path(
774778
}
775779

776780
fn create_js_error(err: anyhow::Error) -> JsValue {
777-
wasm_bindgen::JsError::new(&err.to_string()).into()
781+
wasm_bindgen::JsError::new(&format!("{:#}", err)).into()
778782
}
779783

780784
fn parse_resolution_mode(resolution_mode: u8) -> node_resolver::ResolutionMode {

0 commit comments

Comments
 (0)