feat: check if grep is installed

pull/259/head
Michael Brewer 1 year ago
parent 741a8d7f0b
commit 484fc2747f
No known key found for this signature in database
GPG Key ID: D7A137BA1254AFC7

@ -29,11 +29,15 @@ function extension_installed() {
if [ ! -f "$EXTENSIONS_FILE" ]; then
return 1
fi
if grep -q "\"$1\"" "$EXTENSIONS_FILE"; then
echo "Extension $1 was found in $EXTENSIONS_FILE."
return 0
if ! command -v grep > /dev/null; then
return 1
fi
if ! grep -q "\"$1\"" "$EXTENSIONS_FILE"; then
return 1
fi
echo "Extension $1 was found in $EXTENSIONS_FILE."
return 0
}
# Check if the settings file exists...

Loading…
Cancel
Save