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
+1 -1
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