From bd748052a10ce0ed5f132b0f5656cc79184bf397 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Sun, 10 May 2026 22:15:27 -0400 Subject: [PATCH 1/2] fix: report info-flag should not error when app undeployed Several plugin `:report` subcommands erroneously failed with `not deployed` when an info-flag matched a property that was empty. Empty values are legitimate for configuration properties pre-deploy and the `--format json` path already returns them without error. Remove the `value_exists` check across nginx, checks, git, certs, scheduler-docker-local, and the builder-* plugins so the info-flag form behaves consistently with the JSON form. --- plugins/builder-dockerfile/internal-functions | 1 - plugins/builder-herokuish/internal-functions | 1 - plugins/builder-lambda/internal-functions | 1 - plugins/builder-nixpacks/internal-functions | 1 - plugins/builder-pack/internal-functions | 1 - plugins/builder-railpack/internal-functions | 1 - plugins/certs/internal-functions | 1 - plugins/checks/internal-functions | 1 - plugins/git/internal-functions | 1 - plugins/nginx-vhosts/command-functions | 1 - .../scheduler-docker-local/internal-functions | 1 - tests/unit/builder-dockerfile.bats | 24 +++++++++++++++ tests/unit/builder-herokuish.bats | 24 +++++++++++++++ tests/unit/builder-lambda.bats | 24 +++++++++++++++ tests/unit/builder-nixpacks.bats | 24 +++++++++++++++ tests/unit/builder-pack.bats | 24 +++++++++++++++ tests/unit/builder-railpack.bats | 24 +++++++++++++++ tests/unit/certs.bats | 19 ++++++++++++ tests/unit/checks.bats | 24 +++++++++++++++ tests/unit/git_1.bats | 30 +++++++++++++++++++ tests/unit/nginx-vhosts_1.bats | 29 ++++++++++++++++++ tests/unit/scheduler-docker-local.bats | 26 ++++++++++++++++ 22 files changed, 272 insertions(+), 11 deletions(-) diff --git a/plugins/builder-dockerfile/internal-functions b/plugins/builder-dockerfile/internal-functions index e5c08e462..9fad19125 100755 --- a/plugins/builder-dockerfile/internal-functions +++ b/plugins/builder-dockerfile/internal-functions @@ -88,7 +88,6 @@ cmd-builder-dockerfile-report-single() { fi done [[ "$match" == "true" ]] || dokku_log_fail "Invalid flag passed, valid flags:${valid_flags}" - [[ "$value_exists" == "true" ]] || dokku_log_fail "not deployed" fi } diff --git a/plugins/builder-herokuish/internal-functions b/plugins/builder-herokuish/internal-functions index be773b5de..054eae977 100755 --- a/plugins/builder-herokuish/internal-functions +++ b/plugins/builder-herokuish/internal-functions @@ -88,7 +88,6 @@ cmd-builder-herokuish-report-single() { fi done [[ "$match" == "true" ]] || dokku_log_fail "Invalid flag passed, valid flags:${valid_flags}" - [[ "$value_exists" == "true" ]] || dokku_log_fail "not deployed" fi } diff --git a/plugins/builder-lambda/internal-functions b/plugins/builder-lambda/internal-functions index fb5d6852b..cb0302f91 100755 --- a/plugins/builder-lambda/internal-functions +++ b/plugins/builder-lambda/internal-functions @@ -88,7 +88,6 @@ cmd-builder-lambda-report-single() { fi done [[ "$match" == "true" ]] || dokku_log_fail "Invalid flag passed, valid flags:${valid_flags}" - [[ "$value_exists" == "true" ]] || dokku_log_fail "not deployed" fi } diff --git a/plugins/builder-nixpacks/internal-functions b/plugins/builder-nixpacks/internal-functions index d68c00698..6562291e0 100755 --- a/plugins/builder-nixpacks/internal-functions +++ b/plugins/builder-nixpacks/internal-functions @@ -88,7 +88,6 @@ cmd-builder-nixpacks-report-single() { fi done [[ "$match" == "true" ]] || dokku_log_fail "Invalid flag passed, valid flags:${valid_flags}" - [[ "$value_exists" == "true" ]] || dokku_log_fail "not deployed" fi } diff --git a/plugins/builder-pack/internal-functions b/plugins/builder-pack/internal-functions index b0a19f8ae..8b9afbd0c 100755 --- a/plugins/builder-pack/internal-functions +++ b/plugins/builder-pack/internal-functions @@ -88,7 +88,6 @@ cmd-builder-pack-report-single() { fi done [[ "$match" == "true" ]] || dokku_log_fail "Invalid flag passed, valid flags:${valid_flags}" - [[ "$value_exists" == "true" ]] || dokku_log_fail "not deployed" fi } diff --git a/plugins/builder-railpack/internal-functions b/plugins/builder-railpack/internal-functions index 297a1bbb6..e9df55a82 100755 --- a/plugins/builder-railpack/internal-functions +++ b/plugins/builder-railpack/internal-functions @@ -88,7 +88,6 @@ cmd-builder-railpack-report-single() { fi done [[ "$match" == "true" ]] || dokku_log_fail "Invalid flag passed, valid flags:${valid_flags}" - [[ "$value_exists" == "true" ]] || dokku_log_fail "not deployed" fi } diff --git a/plugins/certs/internal-functions b/plugins/certs/internal-functions index 694cdfe49..14bea9986 100755 --- a/plugins/certs/internal-functions +++ b/plugins/certs/internal-functions @@ -89,7 +89,6 @@ cmd-certs-report-single() { fi done [[ "$match" == "true" ]] || dokku_log_fail "Invalid flag passed, valid flags:${valid_flags}" - [[ "$value_exists" == "true" ]] || dokku_log_fail "not deployed" fi } diff --git a/plugins/checks/internal-functions b/plugins/checks/internal-functions index b2435bc22..7df04d549 100755 --- a/plugins/checks/internal-functions +++ b/plugins/checks/internal-functions @@ -91,7 +91,6 @@ cmd-checks-report-single() { fi done [[ "$match" == "true" ]] || dokku_log_fail "Invalid flag passed, valid flags:${valid_flags}" - [[ "$value_exists" == "true" ]] || dokku_log_fail "not deployed" fi } diff --git a/plugins/git/internal-functions b/plugins/git/internal-functions index d5fe7fb44..d354aa21c 100755 --- a/plugins/git/internal-functions +++ b/plugins/git/internal-functions @@ -421,7 +421,6 @@ cmd-git-report-single() { fi done [[ "$match" == "true" ]] || dokku_log_fail "Invalid flag passed, valid flags:${valid_flags}" - [[ "$value_exists" == "true" ]] || dokku_log_fail "not deployed" fi } diff --git a/plugins/nginx-vhosts/command-functions b/plugins/nginx-vhosts/command-functions index 3b69ca868..1c31b18e7 100755 --- a/plugins/nginx-vhosts/command-functions +++ b/plugins/nginx-vhosts/command-functions @@ -178,7 +178,6 @@ cmd-nginx-report-single() { fi done [[ "$match" == "true" ]] || dokku_log_fail "Invalid flag passed, valid flags:${valid_flags}" - [[ "$value_exists" == "true" ]] || dokku_log_fail "not deployed" fi } diff --git a/plugins/scheduler-docker-local/internal-functions b/plugins/scheduler-docker-local/internal-functions index 056e9a086..15c741795 100755 --- a/plugins/scheduler-docker-local/internal-functions +++ b/plugins/scheduler-docker-local/internal-functions @@ -83,7 +83,6 @@ cmd-scheduler-docker-local-report-single() { fi done [[ "$match" == "true" ]] || dokku_log_fail "Invalid flag passed, valid flags:${valid_flags}" - [[ "$value_exists" == "true" ]] || dokku_log_fail "not deployed" fi } diff --git a/tests/unit/builder-dockerfile.bats b/tests/unit/builder-dockerfile.bats index d6d9b682d..e8f4cd6a9 100644 --- a/tests/unit/builder-dockerfile.bats +++ b/tests/unit/builder-dockerfile.bats @@ -12,6 +12,30 @@ teardown() { destroy_app } +@test "(builder-dockerfile:report) info-flag works before deploy" { + run /bin/bash -c "dokku builder-dockerfile:report $TEST_APP --builder-dockerfile-dockerfile-path" + echo "output: $output" + echo "status: $status" + assert_success + + run /bin/bash -c "dokku builder-dockerfile:set $TEST_APP dockerfile-path second.Dockerfile" + echo "output: $output" + echo "status: $status" + assert_success + + run /bin/bash -c "dokku builder-dockerfile:report $TEST_APP --builder-dockerfile-dockerfile-path" + echo "output: $output" + echo "status: $status" + assert_success + assert_output "second.Dockerfile" + + run /bin/bash -c "dokku builder-dockerfile:report $TEST_APP --builder-dockerfile-invalid-flag" + echo "output: $output" + echo "status: $status" + assert_failure + assert_output_contains "Invalid flag passed" +} + @test "(builder-dockerfile:report) --global --format json" { run /bin/bash -c "dokku builder-dockerfile:report --global --format json | jq -e ." echo "output: $output" diff --git a/tests/unit/builder-herokuish.bats b/tests/unit/builder-herokuish.bats index 9fb024bdc..a96728654 100644 --- a/tests/unit/builder-herokuish.bats +++ b/tests/unit/builder-herokuish.bats @@ -10,6 +10,30 @@ teardown() { destroy_app } +@test "(builder-herokuish:report) info-flag works before deploy" { + run /bin/bash -c "dokku builder-herokuish:report $TEST_APP --builder-herokuish-allowed" + echo "output: $output" + echo "status: $status" + assert_success + + run /bin/bash -c "dokku builder-herokuish:set $TEST_APP allowed false" + echo "output: $output" + echo "status: $status" + assert_success + + run /bin/bash -c "dokku builder-herokuish:report $TEST_APP --builder-herokuish-allowed" + echo "output: $output" + echo "status: $status" + assert_success + assert_output "false" + + run /bin/bash -c "dokku builder-herokuish:report $TEST_APP --builder-herokuish-invalid-flag" + echo "output: $output" + echo "status: $status" + assert_failure + assert_output_contains "Invalid flag passed" +} + @test "(builder-herokuish:report) --global --builder-herokuish-global-allowed" { run /bin/bash -c "dokku builder-herokuish:set --global allowed false" echo "output: $output" diff --git a/tests/unit/builder-lambda.bats b/tests/unit/builder-lambda.bats index e2c0933b5..af2be7121 100644 --- a/tests/unit/builder-lambda.bats +++ b/tests/unit/builder-lambda.bats @@ -10,6 +10,30 @@ teardown() { destroy_app } +@test "(builder-lambda:report) info-flag works before deploy" { + run /bin/bash -c "dokku builder-lambda:report $TEST_APP --builder-lambda-lambdayml-path" + echo "output: $output" + echo "status: $status" + assert_success + + run /bin/bash -c "dokku builder-lambda:set $TEST_APP lambdayml-path lambda.alt.yml" + echo "output: $output" + echo "status: $status" + assert_success + + run /bin/bash -c "dokku builder-lambda:report $TEST_APP --builder-lambda-lambdayml-path" + echo "output: $output" + echo "status: $status" + assert_success + assert_output "lambda.alt.yml" + + run /bin/bash -c "dokku builder-lambda:report $TEST_APP --builder-lambda-invalid-flag" + echo "output: $output" + echo "status: $status" + assert_failure + assert_output_contains "Invalid flag passed" +} + @test "(builder-lambda:report) --global --builder-lambda-global-lambdayml-path" { run /bin/bash -c "dokku builder-lambda:set --global lambdayml-path lambda.alt.yml" echo "output: $output" diff --git a/tests/unit/builder-nixpacks.bats b/tests/unit/builder-nixpacks.bats index 56f4cf20f..a87259bf2 100644 --- a/tests/unit/builder-nixpacks.bats +++ b/tests/unit/builder-nixpacks.bats @@ -14,6 +14,30 @@ teardown() { destroy_app } +@test "(builder-nixpacks:report) info-flag works before deploy" { + run /bin/bash -c "dokku builder-nixpacks:report $TEST_APP --builder-nixpacks-nixpackstoml-path" + echo "output: $output" + echo "status: $status" + assert_success + + run /bin/bash -c "dokku builder-nixpacks:set $TEST_APP nixpackstoml-path nixpacks.alt.toml" + echo "output: $output" + echo "status: $status" + assert_success + + run /bin/bash -c "dokku builder-nixpacks:report $TEST_APP --builder-nixpacks-nixpackstoml-path" + echo "output: $output" + echo "status: $status" + assert_success + assert_output "nixpacks.alt.toml" + + run /bin/bash -c "dokku builder-nixpacks:report $TEST_APP --builder-nixpacks-invalid-flag" + echo "output: $output" + echo "status: $status" + assert_failure + assert_output_contains "Invalid flag passed" +} + @test "(builder-nixpacks:report) --global --builder-nixpacks-global-nixpackstoml-path" { run /bin/bash -c "dokku builder-nixpacks:set --global nixpackstoml-path nixpacks.alt.toml" echo "output: $output" diff --git a/tests/unit/builder-pack.bats b/tests/unit/builder-pack.bats index 9cc3a6a05..d5dbc7887 100644 --- a/tests/unit/builder-pack.bats +++ b/tests/unit/builder-pack.bats @@ -16,6 +16,30 @@ teardown() { global_teardown } +@test "(builder-pack:report) info-flag works before deploy" { + run /bin/bash -c "dokku builder-pack:report $TEST_APP --builder-pack-projecttoml-path" + echo "output: $output" + echo "status: $status" + assert_success + + run /bin/bash -c "dokku builder-pack:set $TEST_APP projecttoml-path project.alt.toml" + echo "output: $output" + echo "status: $status" + assert_success + + run /bin/bash -c "dokku builder-pack:report $TEST_APP --builder-pack-projecttoml-path" + echo "output: $output" + echo "status: $status" + assert_success + assert_output "project.alt.toml" + + run /bin/bash -c "dokku builder-pack:report $TEST_APP --builder-pack-invalid-flag" + echo "output: $output" + echo "status: $status" + assert_failure + assert_output_contains "Invalid flag passed" +} + @test "(builder-pack:report) --global --builder-pack-global-projecttoml-path" { run /bin/bash -c "dokku builder-pack:set --global projecttoml-path project.alt.toml" echo "output: $output" diff --git a/tests/unit/builder-railpack.bats b/tests/unit/builder-railpack.bats index 597283111..626288cd9 100644 --- a/tests/unit/builder-railpack.bats +++ b/tests/unit/builder-railpack.bats @@ -25,6 +25,30 @@ teardown() { global_teardown } +@test "(builder-railpack:report) info-flag works before deploy" { + run /bin/bash -c "dokku builder-railpack:report $TEST_APP --builder-railpack-railpackjson-path" + echo "output: $output" + echo "status: $status" + assert_success + + run /bin/bash -c "dokku builder-railpack:set $TEST_APP railpackjson-path railpack.alt.json" + echo "output: $output" + echo "status: $status" + assert_success + + run /bin/bash -c "dokku builder-railpack:report $TEST_APP --builder-railpack-railpackjson-path" + echo "output: $output" + echo "status: $status" + assert_success + assert_output "railpack.alt.json" + + run /bin/bash -c "dokku builder-railpack:report $TEST_APP --builder-railpack-invalid-flag" + echo "output: $output" + echo "status: $status" + assert_failure + assert_output_contains "Invalid flag passed" +} + @test "(builder-railpack:report) --global --builder-railpack-global-railpackjson-path" { run /bin/bash -c "dokku builder-railpack:set --global railpackjson-path railpack.alt.json" echo "output: $output" diff --git a/tests/unit/certs.bats b/tests/unit/certs.bats index 9de647875..d0df07235 100644 --- a/tests/unit/certs.bats +++ b/tests/unit/certs.bats @@ -41,6 +41,25 @@ teardown() { assert_output "$help_output" } +@test "(certs:report) info-flag works before deploy" { + run /bin/bash -c "dokku certs:report $TEST_APP --ssl-hostnames" + echo "output: $output" + echo "status: $status" + assert_success + + run /bin/bash -c "dokku certs:report $TEST_APP --ssl-dir" + echo "output: $output" + echo "status: $status" + assert_success + assert_output_contains "/$TEST_APP/tls" + + run /bin/bash -c "dokku certs:report $TEST_APP --ssl-invalid-flag" + echo "output: $output" + echo "status: $status" + assert_failure + assert_output_contains "Invalid flag passed" +} + @test "(certs:report) --global --format json" { run /bin/bash -c "dokku certs:report --global --format json | jq -e ." echo "output: $output" diff --git a/tests/unit/checks.bats b/tests/unit/checks.bats index 2ecebb16d..5c60f5b86 100644 --- a/tests/unit/checks.bats +++ b/tests/unit/checks.bats @@ -16,6 +16,30 @@ teardown() { global_teardown } +@test "(checks:report) info-flag works before deploy" { + run /bin/bash -c "dokku checks:report $TEST_APP --checks-wait-to-retire" + echo "output: $output" + echo "status: $status" + assert_success + + run /bin/bash -c "dokku checks:set $TEST_APP wait-to-retire 30" + echo "output: $output" + echo "status: $status" + assert_success + + run /bin/bash -c "dokku checks:report $TEST_APP --checks-wait-to-retire" + echo "output: $output" + echo "status: $status" + assert_success + assert_output "30" + + run /bin/bash -c "dokku checks:report $TEST_APP --checks-invalid-flag" + echo "output: $output" + echo "status: $status" + assert_failure + assert_output_contains "Invalid flag passed" +} + @test "(checks:report) --global --format json" { run /bin/bash -c "dokku checks:set --global wait-to-retire 90" echo "output: $output" diff --git a/tests/unit/git_1.bats b/tests/unit/git_1.bats index 6bbbbe372..910cd8dcf 100644 --- a/tests/unit/git_1.bats +++ b/tests/unit/git_1.bats @@ -12,6 +12,36 @@ teardown() { global_teardown } +@test "(git:report) info-flag works before deploy" { + run /bin/bash -c "dokku git:report $TEST_APP --git-deploy-branch" + echo "output: $output" + echo "status: $status" + assert_success + assert_output "master" + + run /bin/bash -c "dokku git:set $TEST_APP deploy-branch main" + echo "output: $output" + echo "status: $status" + assert_success + + run /bin/bash -c "dokku git:report $TEST_APP --git-deploy-branch" + echo "output: $output" + echo "status: $status" + assert_success + assert_output "main" + + run /bin/bash -c "dokku git:report $TEST_APP --git-sha" + echo "output: $output" + echo "status: $status" + assert_success + + run /bin/bash -c "dokku git:report $TEST_APP --git-invalid-flag" + echo "output: $output" + echo "status: $status" + assert_failure + assert_output_contains "Invalid flag passed" +} + @test "(git) git:help" { run /bin/bash -c "dokku git" echo "output: $output" diff --git a/tests/unit/nginx-vhosts_1.bats b/tests/unit/nginx-vhosts_1.bats index d7ff9da48..c42d10246 100644 --- a/tests/unit/nginx-vhosts_1.bats +++ b/tests/unit/nginx-vhosts_1.bats @@ -28,6 +28,35 @@ teardown() { assert_output "$help_output" } +@test "(nginx:report) info-flag works before deploy" { + run create_app + echo "output: $output" + echo "status: $status" + assert_success + + run /bin/bash -c "dokku nginx:report $TEST_APP --nginx-bind-address-ipv4" + echo "output: $output" + echo "status: $status" + assert_success + + run /bin/bash -c "dokku nginx:set $TEST_APP bind-address-ipv4 127.0.0.1" + echo "output: $output" + echo "status: $status" + assert_success + + run /bin/bash -c "dokku nginx:report $TEST_APP --nginx-bind-address-ipv4" + echo "output: $output" + echo "status: $status" + assert_success + assert_output "127.0.0.1" + + run /bin/bash -c "dokku nginx:report $TEST_APP --nginx-invalid-flag" + echo "output: $output" + echo "status: $status" + assert_failure + assert_output_contains "Invalid flag passed" +} + @test "(nginx:report) --format json" { run create_app echo "output: $output" diff --git a/tests/unit/scheduler-docker-local.bats b/tests/unit/scheduler-docker-local.bats index b0801cb87..2dc5a677f 100644 --- a/tests/unit/scheduler-docker-local.bats +++ b/tests/unit/scheduler-docker-local.bats @@ -18,6 +18,32 @@ teardown() { assert_output "true" } +@test "(scheduler-docker-local:report) info-flag works before deploy" { + run create_app + echo "output: $output" + echo "status: $status" + assert_success + + run /bin/bash -c "dokku scheduler-docker-local:report $TEST_APP --scheduler-docker-local-parallel-schedule-count" + echo "output: $output" + echo "status: $status" + assert_success + + run /bin/bash -c "dokku scheduler-docker-local:report $TEST_APP --scheduler-docker-local-init-process" + echo "output: $output" + echo "status: $status" + assert_success + assert_output "true" + + run /bin/bash -c "dokku scheduler-docker-local:report $TEST_APP --scheduler-docker-local-invalid-flag" + echo "output: $output" + echo "status: $status" + assert_failure + assert_output_contains "Invalid flag passed" + + destroy_app +} + @test "(scheduler-docker-local) scheduler-docker-local:help" { run /bin/bash -c "dokku scheduler-docker-local" echo "output: $output" From 7b515ea12982435c2128f2e086dcd6ba91088aec Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Sun, 10 May 2026 22:23:46 -0400 Subject: [PATCH 2/2] refactor: drop unused value_exists from report functions The `value_exists` variable in the report info-flag loop is no longer read after the `not deployed` failure was removed, and was already unused in domains, haproxy-vhosts, traefik-vhosts, caddy-vhosts, and openresty-vhosts. Drop the declaration and the trailing assignment so the loop reads cleanly across all plugins. --- plugins/builder-dockerfile/internal-functions | 3 +-- plugins/builder-herokuish/internal-functions | 3 +-- plugins/builder-lambda/internal-functions | 3 +-- plugins/builder-nixpacks/internal-functions | 3 +-- plugins/builder-pack/internal-functions | 3 +-- plugins/builder-railpack/internal-functions | 3 +-- plugins/caddy-vhosts/command-functions | 3 +-- plugins/certs/internal-functions | 3 +-- plugins/checks/internal-functions | 3 +-- plugins/domains/internal-functions | 3 +-- plugins/git/internal-functions | 3 +-- plugins/haproxy-vhosts/command-functions | 3 +-- plugins/nginx-vhosts/command-functions | 3 +-- plugins/openresty-vhosts/command-functions | 3 +-- plugins/scheduler-docker-local/internal-functions | 3 +-- plugins/traefik-vhosts/command-functions | 3 +-- 16 files changed, 16 insertions(+), 32 deletions(-) diff --git a/plugins/builder-dockerfile/internal-functions b/plugins/builder-dockerfile/internal-functions index 9fad19125..85fdb9f24 100755 --- a/plugins/builder-dockerfile/internal-functions +++ b/plugins/builder-dockerfile/internal-functions @@ -74,14 +74,13 @@ cmd-builder-dockerfile-report-single() { done else local match=false - local value_exists=false for flag in "${flag_map[@]}"; do valid_flags="${valid_flags} $(echo "$flag" | cut -d':' -f1)" if [[ "$flag" == "${INFO_FLAG}:"* ]]; then value=${flag#*: } size="${#value}" if [[ "$size" -ne 0 ]]; then - echo "$value" && match=true && value_exists=true + echo "$value" && match=true else match=true fi diff --git a/plugins/builder-herokuish/internal-functions b/plugins/builder-herokuish/internal-functions index 054eae977..78c93f514 100755 --- a/plugins/builder-herokuish/internal-functions +++ b/plugins/builder-herokuish/internal-functions @@ -74,14 +74,13 @@ cmd-builder-herokuish-report-single() { done else local match=false - local value_exists=false for flag in "${flag_map[@]}"; do valid_flags="${valid_flags} $(echo "$flag" | cut -d':' -f1)" if [[ "$flag" == "${INFO_FLAG}:"* ]]; then value=${flag#*: } size="${#value}" if [[ "$size" -ne 0 ]]; then - echo "$value" && match=true && value_exists=true + echo "$value" && match=true else match=true fi diff --git a/plugins/builder-lambda/internal-functions b/plugins/builder-lambda/internal-functions index cb0302f91..1459dc0f3 100755 --- a/plugins/builder-lambda/internal-functions +++ b/plugins/builder-lambda/internal-functions @@ -74,14 +74,13 @@ cmd-builder-lambda-report-single() { done else local match=false - local value_exists=false for flag in "${flag_map[@]}"; do valid_flags="${valid_flags} $(echo "$flag" | cut -d':' -f1)" if [[ "$flag" == "${INFO_FLAG}:"* ]]; then value=${flag#*: } size="${#value}" if [[ "$size" -ne 0 ]]; then - echo "$value" && match=true && value_exists=true + echo "$value" && match=true else match=true fi diff --git a/plugins/builder-nixpacks/internal-functions b/plugins/builder-nixpacks/internal-functions index 6562291e0..1f41c319e 100755 --- a/plugins/builder-nixpacks/internal-functions +++ b/plugins/builder-nixpacks/internal-functions @@ -74,14 +74,13 @@ cmd-builder-nixpacks-report-single() { done else local match=false - local value_exists=false for flag in "${flag_map[@]}"; do valid_flags="${valid_flags} $(echo "$flag" | cut -d':' -f1)" if [[ "$flag" == "${INFO_FLAG}:"* ]]; then value=${flag#*: } size="${#value}" if [[ "$size" -ne 0 ]]; then - echo "$value" && match=true && value_exists=true + echo "$value" && match=true else match=true fi diff --git a/plugins/builder-pack/internal-functions b/plugins/builder-pack/internal-functions index 8b9afbd0c..548fbe2b2 100755 --- a/plugins/builder-pack/internal-functions +++ b/plugins/builder-pack/internal-functions @@ -74,14 +74,13 @@ cmd-builder-pack-report-single() { done else local match=false - local value_exists=false for flag in "${flag_map[@]}"; do valid_flags="${valid_flags} $(echo "$flag" | cut -d':' -f1)" if [[ "$flag" == "${INFO_FLAG}:"* ]]; then value=${flag#*: } size="${#value}" if [[ "$size" -ne 0 ]]; then - echo "$value" && match=true && value_exists=true + echo "$value" && match=true else match=true fi diff --git a/plugins/builder-railpack/internal-functions b/plugins/builder-railpack/internal-functions index e9df55a82..3d3e31297 100755 --- a/plugins/builder-railpack/internal-functions +++ b/plugins/builder-railpack/internal-functions @@ -74,14 +74,13 @@ cmd-builder-railpack-report-single() { done else local match=false - local value_exists=false for flag in "${flag_map[@]}"; do valid_flags="${valid_flags} $(echo "$flag" | cut -d':' -f1)" if [[ "$flag" == "${INFO_FLAG}:"* ]]; then value=${flag#*: } size="${#value}" if [[ "$size" -ne 0 ]]; then - echo "$value" && match=true && value_exists=true + echo "$value" && match=true else match=true fi diff --git a/plugins/caddy-vhosts/command-functions b/plugins/caddy-vhosts/command-functions index a8d56f85f..85ec998a0 100755 --- a/plugins/caddy-vhosts/command-functions +++ b/plugins/caddy-vhosts/command-functions @@ -107,14 +107,13 @@ cmd-caddy-report-single() { done else local match=false - local value_exists=false for flag in "${flag_map[@]}"; do valid_flags="${valid_flags} $(echo "$flag" | cut -d':' -f1)" if [[ "$flag" == "${INFO_FLAG}:"* ]]; then value=${flag#*: } size="${#value}" if [[ "$size" -ne 0 ]]; then - echo "$value" && match=true && value_exists=true + echo "$value" && match=true else match=true fi diff --git a/plugins/certs/internal-functions b/plugins/certs/internal-functions index 14bea9986..a81bd92f2 100755 --- a/plugins/certs/internal-functions +++ b/plugins/certs/internal-functions @@ -75,14 +75,13 @@ cmd-certs-report-single() { done else local match=false - local value_exists=false for flag in "${flag_map[@]}"; do valid_flags="${valid_flags} $(echo "$flag" | cut -d':' -f1)" if [[ "$flag" == "${INFO_FLAG}:"* ]]; then value=${flag#*: } size="${#value}" if [[ "$size" -ne 0 ]]; then - echo "$value" && match=true && value_exists=true + echo "$value" && match=true else match=true fi diff --git a/plugins/checks/internal-functions b/plugins/checks/internal-functions index 7df04d549..47c1b4953 100755 --- a/plugins/checks/internal-functions +++ b/plugins/checks/internal-functions @@ -77,14 +77,13 @@ cmd-checks-report-single() { done else local match=false - local value_exists=false for flag in "${flag_map[@]}"; do valid_flags="${valid_flags} $(echo "$flag" | cut -d':' -f1)" if [[ "$flag" == "${INFO_FLAG}:"* ]]; then value=${flag#*: } size="${#value}" if [[ "$size" -ne 0 ]]; then - echo "$value" && match=true && value_exists=true + echo "$value" && match=true else match=true fi diff --git a/plugins/domains/internal-functions b/plugins/domains/internal-functions index 1a050eeb7..7699d5888 100755 --- a/plugins/domains/internal-functions +++ b/plugins/domains/internal-functions @@ -77,14 +77,13 @@ cmd-domains-report-single() { done else local match=false - local value_exists=false for flag in "${flag_map[@]}"; do valid_flags="${valid_flags} $(echo "$flag" | cut -d':' -f1)" if [[ "$flag" == "${INFO_FLAG}:"* ]]; then value=${flag#*: } size="${#value}" if [[ "$size" -ne 0 ]]; then - echo "$value" && match=true && value_exists=true + echo "$value" && match=true else match=true fi diff --git a/plugins/git/internal-functions b/plugins/git/internal-functions index d354aa21c..6b40647f2 100755 --- a/plugins/git/internal-functions +++ b/plugins/git/internal-functions @@ -407,14 +407,13 @@ cmd-git-report-single() { done else local match=false - local value_exists=false for flag in "${flag_map[@]}"; do valid_flags="${valid_flags} $(echo "$flag" | cut -d':' -f1)" if [[ "$flag" == "${INFO_FLAG}:"* ]]; then value=${flag#*: } size="${#value}" if [[ "$size" -ne 0 ]]; then - echo "$value" && match=true && value_exists=true + echo "$value" && match=true else match=true fi diff --git a/plugins/haproxy-vhosts/command-functions b/plugins/haproxy-vhosts/command-functions index 00ac09698..fb0e92e3a 100755 --- a/plugins/haproxy-vhosts/command-functions +++ b/plugins/haproxy-vhosts/command-functions @@ -97,14 +97,13 @@ cmd-haproxy-report-single() { done else local match=false - local value_exists=false for flag in "${flag_map[@]}"; do valid_flags="${valid_flags} $(echo "$flag" | cut -d':' -f1)" if [[ "$flag" == "${INFO_FLAG}:"* ]]; then value=${flag#*: } size="${#value}" if [[ "$size" -ne 0 ]]; then - echo "$value" && match=true && value_exists=true + echo "$value" && match=true else match=true fi diff --git a/plugins/nginx-vhosts/command-functions b/plugins/nginx-vhosts/command-functions index 1c31b18e7..e48032d00 100755 --- a/plugins/nginx-vhosts/command-functions +++ b/plugins/nginx-vhosts/command-functions @@ -164,14 +164,13 @@ cmd-nginx-report-single() { done else local match=false - local value_exists=false for flag in "${flag_map[@]}"; do valid_flags="${valid_flags} $(echo "$flag" | cut -d':' -f1)" if [[ "$flag" == "${INFO_FLAG}:"* ]]; then value=${flag#*: } size="${#value}" if [[ "$size" -ne 0 ]]; then - echo "$value" && match=true && value_exists=true + echo "$value" && match=true else match=true fi diff --git a/plugins/openresty-vhosts/command-functions b/plugins/openresty-vhosts/command-functions index a3515429e..cc31c01f1 100755 --- a/plugins/openresty-vhosts/command-functions +++ b/plugins/openresty-vhosts/command-functions @@ -134,14 +134,13 @@ cmd-openresty-report-single() { done else local match=false - local value_exists=false for flag in "${flag_map[@]}"; do valid_flags="${valid_flags} $(echo "$flag" | cut -d':' -f1)" if [[ "$flag" == "${INFO_FLAG}:"* ]]; then value=${flag#*: } size="${#value}" if [[ "$size" -ne 0 ]]; then - echo "$value" && match=true && value_exists=true + echo "$value" && match=true else match=true fi diff --git a/plugins/scheduler-docker-local/internal-functions b/plugins/scheduler-docker-local/internal-functions index 15c741795..e947d782a 100755 --- a/plugins/scheduler-docker-local/internal-functions +++ b/plugins/scheduler-docker-local/internal-functions @@ -69,14 +69,13 @@ cmd-scheduler-docker-local-report-single() { done else local match=false - local value_exists=false for flag in "${flag_map[@]}"; do valid_flags="${valid_flags} $(echo "$flag" | cut -d':' -f1)" if [[ "$flag" == "${INFO_FLAG}:"* ]]; then value=${flag#*: } size="${#value}" if [[ "$size" -ne 0 ]]; then - echo "$value" && match=true && value_exists=true + echo "$value" && match=true else match=true fi diff --git a/plugins/traefik-vhosts/command-functions b/plugins/traefik-vhosts/command-functions index 9d7a922a1..9f350edf1 100755 --- a/plugins/traefik-vhosts/command-functions +++ b/plugins/traefik-vhosts/command-functions @@ -124,14 +124,13 @@ cmd-traefik-report-single() { done else local match=false - local value_exists=false for flag in "${flag_map[@]}"; do valid_flags="${valid_flags} $(echo "$flag" | cut -d':' -f1)" if [[ "$flag" == "${INFO_FLAG}:"* ]]; then value=${flag#*: } size="${#value}" if [[ "$size" -ne 0 ]]; then - echo "$value" && match=true && value_exists=true + echo "$value" && match=true else match=true fi