Merge pull request #271243 from shyim/fix-opensearch-boot

nixos/opensearch: check plugins directory exists before checking content
This commit is contained in:
Sarah Brofeldt 2023-12-01 06:33:50 +01:00 committed by GitHub
commit 110828e412
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -200,7 +200,7 @@ in
# Install plugins
# remove plugins directory if it is empty.
if [ -z "$(ls -A ${cfg.dataDir}/plugins)" ]; then
if [[ -d ${cfg.dataDir}/plugins && -z "$(ls -A ${cfg.dataDir}/plugins)" ]]; then
rm -r "${cfg.dataDir}/plugins"
fi