File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change 1
1
mod logger;
2
2
3
- use anyhow:: { anyhow, Error } ;
3
+ use anyhow:: { anyhow, bail , Error } ;
4
4
use base:: commands:: start_server;
5
5
use base:: server:: WorkerEntrypoints ;
6
6
use clap:: builder:: FalseyValueParser ;
@@ -136,8 +136,13 @@ fn main() -> Result<(), anyhow::Error> {
136
136
. unwrap ( ) ;
137
137
138
138
let path = PathBuf :: from ( entry_point_path. as_str ( ) ) ;
139
+ if !path. exists ( ) {
140
+ bail ! ( "entrypoint path does not exist ({})" , path. display( ) ) ;
141
+ }
142
+
139
143
let mut emitter_factory = EmitterFactory :: new ( ) ;
140
- let maybe_import_map = load_import_map ( import_map_path. clone ( ) ) ?;
144
+ let maybe_import_map = load_import_map ( import_map_path. clone ( ) )
145
+ . map_err ( |e| anyhow ! ( "import map path is invalid ({})" , e) ) ?;
141
146
let mut maybe_import_map_url = None ;
142
147
if maybe_import_map. is_some ( ) {
143
148
let abs_import_map_path =
You can’t perform that action at this time.
0 commit comments