From ab4389fc5fb2b46fd952ecedb0f1c989a64c06fb Mon Sep 17 00:00:00 2001 From: Tobias Jungel <1773291+toanju@users.noreply.github.com> Date: Sun, 9 Nov 2025 21:44:49 +0100 Subject: [PATCH] fix(bootstrap): set shopt nullglob Set the `nullglob` option in the bootstrap script to handle cases where no files match a glob pattern. This prevents the following error when the folder exists without json files: ``` /bootstrap/group-configs/*.json: jq: error: Could not open file /bootstrap/group-configs/*.json: No such file or directory ``` --- scripts/bootstrap.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/bootstrap.sh b/scripts/bootstrap.sh index 61048cb..41e3d5a 100755 --- a/scripts/bootstrap.sh +++ b/scripts/bootstrap.sh @@ -605,6 +605,7 @@ main() { local group_schema_files=() local file='' + shopt -s nullglob [[ -d "$USER_CONFIGS_DIR" ]] && for file in "${USER_CONFIGS_DIR}"/*.json; do user_config_files+=("$file") done @@ -617,6 +618,7 @@ main() { [[ -d "$GROUP_SCHEMAS_DIR" ]] && for file in "${GROUP_SCHEMAS_DIR}"/*.json; do group_schema_files+=("$file") done + shopt -u nullglob if ! check_configs_validity "${group_config_files[@]}" "${user_config_files[@]}" "${group_schema_files[@]}" "${user_schema_files[@]}"; then exit 1