Skip to content

Commit 21bba83

Browse files
aspeddrocristianoc
authored andcommitted
add error if the lib dir is included in the sources
Close #5440
1 parent 870db32 commit 21bba83

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

jscomp/bsb/bsb_parse_sources.ml

+3
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,9 @@ and parsing_single_source ({ package_kind; is_dev; cwd } as cxt)
298298
let dir =
299299
match map.?(Bsb_build_schemas.dir) with
300300
| Some (Str { str }) ->
301+
if str = Literals.library_file then
302+
Bsb_exception.config_error x (Printf.sprintf "dir field should be different from `%s`" Literals.library_file)
303+
else
301304
Ext_path.simple_convert_node_path_to_os_path str
302305
| Some x ->
303306
Bsb_exception.config_error x "dir expected to be a string"

0 commit comments

Comments
 (0)