You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@solr.apache.org by ho...@apache.org on 2024/02/07 17:11:44 UTC
(solr) branch main updated: SOLR-15960: Find unexported variables with compgen (#2250)
This is an automated email from the ASF dual-hosted git repository.
houston pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/solr.git
The following commit(s) were added to refs/heads/main by this push:
new f23c8deb188 SOLR-15960: Find unexported variables with compgen (#2250)
f23c8deb188 is described below
commit f23c8deb18862a84af055bf71c5e6f6dd9f960f9
Author: Houston Putman <ho...@apache.org>
AuthorDate: Wed Feb 7 12:11:39 2024 -0500
SOLR-15960: Find unexported variables with compgen (#2250)
---
solr/bin/solr | 2 +-
solr/packaging/test/test_modules.bats | 6 +++++-
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/solr/bin/solr b/solr/bin/solr
index 3e64bdc5dc3..0e2f93ae348 100755
--- a/solr/bin/solr
+++ b/solr/bin/solr
@@ -113,7 +113,7 @@ elif [ -r "$SOLR_INCLUDE" ]; then
fi
# Export variables we want to make visible to Solr sub-process
-for var in $(compgen -e); do
+for var in $(compgen -v); do
if [[ "$var" =~ ^(SOLR_.*|DEFAULT_CONFDIR|ZK_.*|GCS_BUCKET|GCS_.*|S3_.*|OTEL_.*|AWS_.*)$ ]]; then
export "${var?}"
fi
diff --git a/solr/packaging/test/test_modules.bats b/solr/packaging/test/test_modules.bats
index 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 -c
run solr create -c COLL_NAME -d test/analysis_extras_config/conf
assert_output --partial "Created collection 'COLL_NAME'"
}