From 1f7bebcef24c62787e3ec0b96022e2453270ae41 Mon Sep 17 00:00:00 2001 From: Achim Gsell Date: Thu, 3 Nov 2022 14:28:50 +0100 Subject: [PATCH] modbuild: exit if no suitable variants file could be found --- Pmodules/modbuild.in | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Pmodules/modbuild.in b/Pmodules/modbuild.in index 6aa9543..c202e03 100755 --- a/Pmodules/modbuild.in +++ b/Pmodules/modbuild.in @@ -297,6 +297,9 @@ find_variants_files(){ || [[ -e "${f}.$(uname -s)" ]] \ || files+=( "$f" ) done + if (( ${#files[@]} == 0 )); then + std::die 2 "No suitable variants file found!" + fi (( nullglob_set == 1 )) && shopt -u nullglob std::upvar "$1" "${files[@]}" }