Skip to content

Commit a846cab

Browse files
authored
Merge pull request #435 from wunderio/feature/QAG-49-2
QAG-49: (fix) Add plugin existence check for Elasticsearch installations
2 parents ed8ded3 + b9b487a commit a846cab

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

.ddev/config.yaml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,13 @@ corepack_enable: false
2929
hooks:
3030
post-start:
3131
- exec: "composer install"
32-
- exec: "elasticsearch-plugin install analysis-icu analysis-ukrainian"
32+
- exec: |
33+
plugins=(analysis-icu analysis-ukrainian)
34+
for plugin in "${plugins[@]}"; do
35+
if ! elasticsearch-plugin list | grep -q "^$plugin\b"; then
36+
elasticsearch-plugin install "$plugin"
37+
else
38+
echo "Plugin $plugin is already installed"
39+
fi
40+
done
3341
service: elasticsearch

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,8 @@ This project supports two local development environments: DDEV (preferred) and L
7474
#### DDEV setup instructions
7575

7676
1. Install [DDEV](https://ddev.com/get-started/)
77-
2. Start the environment and set up your project:
77+
2. Ensure Docker is running on your system
78+
3. Start the environment and set up your project:
7879

7980
```bash
8081
# Start the DDEV environment

0 commit comments

Comments
 (0)