Skip to content

Commit

Permalink
When read_yaml is true, check for YAML file first, then fall back to …
Browse files Browse the repository at this point in the history
…Dependencies. Otherwise, projects without a YAML file don't work.
  • Loading branch information
tkralphs committed Feb 5, 2022
1 parent 4685be7 commit d3000b5
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions coinbrew
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit d3000b5

Please sign in to comment.