Skip to content

Commit

Permalink
fixes the --list-recipes option (#888)
Browse files Browse the repository at this point in the history
it was broken since after we enabled absolute path loading
  • Loading branch information
ivg authored and gitoleg committed Oct 10, 2018
1 parent 5b164cd commit b1feeee
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/bap_main.ml
Original file line number Diff line number Diff line change
Expand Up @@ -282,11 +282,11 @@ let print_recipes_and_exit () =
List.iter recipe_paths ~f:(fun dir ->
if Sys.file_exists dir &&
Sys.is_directory dir
then Array.iter (Sys.readdir dir) ~f:(fun file ->
let file = dir / file in
then Array.iter (Sys.readdir dir) ~f:(fun entry ->
let file = dir / entry in
if Filename.check_suffix file ".recipe"
then
let name = Filename.chop_suffix file ".recipe" in
let name = Filename.chop_suffix entry ".recipe" in
match Recipe.load ~paths:recipe_paths name with
| Ok r ->
printf "%-32s %s\n" (Filename.basename name)
Expand Down

0 comments on commit b1feeee

Please sign in to comment.