Skip to content

Commit

Permalink
feat: remove jq dependency
Browse files Browse the repository at this point in the history
It's currently only used in one place. Let's reduce dependencies.
  • Loading branch information
thlehmann-ionos committed Nov 14, 2024
1 parent 9ad1451 commit 8afe1f5
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions configure.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,6 @@ checks() {
if ! which php >/dev/null 2>&1; then
fail "Error: php is required"
fi

if ! which jq >/dev/null 2>&1; then
fail "Error: jq is required"
fi
}

config_server() {
Expand Down Expand Up @@ -95,8 +91,7 @@ add_config_partials() {
main() {
checks

# Redirecting jq's stderr to drop parser error message that we can test for it
local status="$( ooc status --output json 2>/dev/null | jq '.installed' 2>/dev/null )"
local status="$( ooc status 2>/dev/null | grep 'installed: ' | sed -r 's/^.*installed: (.+)$/\1/' )"

# Parse validation
if [ "${status}" != "true" ] && [ "${status}" != false ]; then
Expand Down

0 comments on commit 8afe1f5

Please sign in to comment.