Skip to content

Commit

Permalink
init: fix undefined variables check
Browse files Browse the repository at this point in the history
Previously, it considered variables that were set to an empty string as
undefined. This made it impossible to skip optional features (those that
can be skipped by setting the relevant variables to empty strings).

Signed-off-by: Adam Cmiel <[email protected]>
  • Loading branch information
chmeliik committed Oct 18, 2024
1 parent f1e5aa6 commit 913da0b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rhtap/verify-deps-exist
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function binary_check ()
function env_must_be_defined ()
{
env_var="$1"
if [ -z "${!env_var}" ]; then
if [ "${!env_var+defined}" != defined ]; then
echo "Error: $env_var missing definition."
ANY_ERRORS=true
else
Expand Down

0 comments on commit 913da0b

Please sign in to comment.