From b056051603654d5ea6a6791e2778b57a0c1d1683 Mon Sep 17 00:00:00 2001 From: Tim Byrne Date: Wed, 8 Jul 2020 02:03:52 -0500 Subject: [PATCH] Identify yadm's configuration using $YADM_CONFIG --- yadm | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/yadm b/yadm index 58a7418..57219c8 100755 --- a/yadm +++ b/yadm @@ -251,9 +251,8 @@ function record_score() { done # if we don't find an existing index, create one by appending to the array if [ "$index" -eq -1 ]; then - # The configuration must be the first alt of the list. - # This ensures that if any templates uses "yadm config some-confid", the config will be available. - if [ "$tgt" = "$YADM_DIR/.config/yadm/config" ]; then + # $YADM_CONFIG must be processed first, in case other templates lookup yadm configurations + if [ "$tgt" = "$YADM_CONFIG" ]; then alt_targets=("$tgt" "${alt_targets[@]}") alt_scores=(0 "${alt_scores[@]}") index=0