Apache Solr open-source search software
SOLR-15960: Find unexported variables with compgen (#2250)
Houston Putmanf23c8deb1886
diff --git a/solr/bin/solr b/solr/bin/solrindex 3e64bdc5dc3..0e2f93ae348 100755--- a/solr/bin/solr+++ b/solr/bin/solr@@ -113,7 +113,7 @@ elif [ -r "$SOLR_INCLUDE" ]; thenfi# Export variables we want to make visible to Solr sub-process-for var in $(compgen -e); do+for var in $(compgen -v); doif [[ "$var" =~ ^(SOLR_.*|DEFAULT_CONFDIR|ZK_.*|GCS_BUCKET|GCS_.*|S3_.*|OTEL_.*|AWS_.*)$ ]]; thenexport "${var?}"fidiff --git a/solr/packaging/test/test_modules.bats b/solr/packaging/test/test_modules.batsindex 4fb71925123..543c6ecc65d 100644--- a/solr/packaging/test/test_modules.bats+++ b/solr/packaging/test/test_modules.bats@@ -61,7 +61,11 @@ teardown() {}@test "icu collation in analysis-extras module" {- run solr start -c -Dsolr.modules=analysis-extras+ local solr_include_file="${BATS_TEST_TMPDIR}/solr.include"+ echo "SOLR_MODULES=analysis-extras" > "${solr_include_file}"++ export SOLR_INCLUDE="${solr_include_file}"+ run solr start -crun solr create -c COLL_NAME -d test/analysis_extras_config/confassert_output --partial "Created collection 'COLL_NAME'"}