Skip to content

Commit

Permalink
chore: Make error message consistent
Browse files Browse the repository at this point in the history
  • Loading branch information
fiftydinar authored Dec 23, 2024
1 parent 2790123 commit ecffeae
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions modules/dnf/dnf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,8 @@ if [[ ${#REPLACE[@]} -gt 0 ]]; then
REPO="${REPO//[$'\t\r\n ']}"

# Ensure repository is provided
if [[ "${REPO}" == "null" ]]; then
echo "Error: Key 'from-repo' was declared, but repository URL was not provided."
if [[ "${REPO}" == "null" ]] || [[ -z "${REPO}" ]]; then
echo "ERROR: Key 'from-repo' was declared, but repository URL was not provided."
exit 1
fi

Expand All @@ -191,7 +191,7 @@ if [[ ${#REPLACE[@]} -gt 0 ]]; then

# Ensure packages are provided
if [[ ${#PACKAGES[@]} -eq 0 ]]; then
echo "Error: No packages were provided for repository '${REPO}'."
echo "ERROR: No packages were provided for repository '${REPO}'."
exit 1
fi

Expand Down

0 comments on commit ecffeae

Please sign in to comment.