Skip to content

Commit b1feeee

Browse files
ivggitoleg
authored andcommitted
fixes the --list-recipes option (#888)
it was broken since after we enabled absolute path loading
1 parent 5b164cd commit b1feeee

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/bap_main.ml

+3-3
Original file line numberDiff line numberDiff line change
@@ -282,11 +282,11 @@ let print_recipes_and_exit () =
282282
List.iter recipe_paths ~f:(fun dir ->
283283
if Sys.file_exists dir &&
284284
Sys.is_directory dir
285-
then Array.iter (Sys.readdir dir) ~f:(fun file ->
286-
let file = dir / file in
285+
then Array.iter (Sys.readdir dir) ~f:(fun entry ->
286+
let file = dir / entry in
287287
if Filename.check_suffix file ".recipe"
288288
then
289-
let name = Filename.chop_suffix file ".recipe" in
289+
let name = Filename.chop_suffix entry ".recipe" in
290290
match Recipe.load ~paths:recipe_paths name with
291291
| Ok r ->
292292
printf "%-32s %s\n" (Filename.basename name)

0 commit comments

Comments
 (0)