From d3000b547641d8d2573fa229ede959b685c679f4 Mon Sep 17 00:00:00 2001 From: Ted Ralphs Date: Sat, 5 Feb 2022 14:23:38 -0500 Subject: [PATCH] When read_yaml is true, check for YAML file first, then fall back to Dependencies. Otherwise, projects without a YAML file don't work. --- coinbrew | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/coinbrew b/coinbrew index dd759cc..4d817a3 100755 --- a/coinbrew +++ b/coinbrew @@ -1032,22 +1032,23 @@ function prompt_for_rebuild { function parse_dependencies_file { dep_file= if [ "$main_proj" = "" ]; then - if [ -e Dependencies ] && [ $read_yaml = false ]; then + if [ -e .coin-or/config.yml ] && [ $read_yaml = true ]; then + dep_file=.coin-or/config.yml + elif [ -e Dependencies ]; then dep_file=Dependencies - elif [ -e .coin-or/Dependencies ] && [ $read_yaml = false ]; then + elif [ -e .coin-or/Dependencies ]; then dep_file=.coin-or/Dependencies - elif [ -e .coin-or/config.yml ]; then - dep_file=.coin-or/config.yml fi else - if [ -e $main_proj_dir/Dependencies ] && [ $read_yaml = false ]; then + if [ -e $main_proj_dir/.coin-or/config.yml ] && + [ $read_yaml = true ]; then + dep_file=$main_proj_dir/.coin-or/config.yml + elif [ -e $main_proj_dir/Dependencies ]; then dep_file=$main_proj_dir/Dependencies - elif [ -e $main_proj_dir/.coin-or/Dependencies ] && [ $read_yaml = false ]; then + elif [ -e $main_proj_dir/.coin-or/Dependencies ]; then dep_file=$main_proj_dir/.coin-or/Dependencies elif [ -e $main_proj_dir/$main_proj_dir/Dependencies ] && [ $read_yaml = false ]; then dep_file=$main_proj_dir/$main_proj_dir/Dependencies - elif [ -e $main_proj_dir/.coin-or/config.yml ]; then - dep_file=$main_proj_dir/.coin-or/config.yml fi fi