Skip to content

Commit 391d364

Browse files
authored
Merge pull request #218 from EngineScript/copilot/fix-grep-command-usage
fix: remove unnecessary grep -E flag and clarify Adminer warning message
2 parents 4ef63c0 + ba386e0 commit 391d364

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

scripts/install/tools/frontend/admin-control-panel-install.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ if [[ "${INSTALL_ADMINER}" -eq 0 ]]; then
5252
# If this structure changes, update this command (or switch to an HTML-aware tool) to avoid partial removal.
5353
# To avoid corrupting the page if the structure has changed, first ensure that the expected
5454
# single-line opening <div> for the Adminer card is present before applying the sed range.
55-
if grep -qE '<div[^>]*id="adminer-tool"[^>]*>' "/var/www/admin/control-panel/index.html"; then
55+
if grep -q '<div[^>]*id="adminer-tool"[^>]*>' "/var/www/admin/control-panel/index.html"; then
5656
# Extract the block that would be deleted, then perform a simple sanity check
5757
# to ensure there are no nested <div> elements that would cause a partial removal.
5858
adminer_block="$(
@@ -66,7 +66,7 @@ if [[ "${INSTALL_ADMINER}" -eq 0 ]]; then
6666
echo "Warning: Adminer tool block appears to contain nested <div> elements; skipping Adminer card removal to avoid corrupting index.html." >&2
6767
fi
6868
else
69-
echo "Warning: Expected Adminer tool div not found in index.html; skipping Adminer card removal." >&2
69+
echo "Warning: Expected <div> with id=\"adminer-tool\" not found in index.html; skipping Adminer card removal." >&2
7070

7171
fi
7272
fi

0 commit comments

Comments
 (0)