Permalink
Browse files

fixes the --list-recipes option (#888)

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 b1feeee1c4ef1771b5b45c8d1a8439838389082f
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/bap_main.ml
View
@@ -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)

0 comments on commit b1feeee

Please sign in to comment.