Skip to content

Commit

Permalink
Forbid empty inputs
Browse files Browse the repository at this point in the history
  • Loading branch information
KSXGitHub committed May 27, 2021
1 parent cdb09ed commit 695685e
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,20 @@ allow_empty_commits=$INPUT_ALLOW_EMPTY_COMMITS
force_push=$INPUT_FORCE_PUSH
ssh_keyscan_types=$INPUT_SSH_KEYSCAN_TYPES

assert_non_empty() {
name=$1
value=$2
if [[ -z "$value" ]]; then
echo "::error::Invalid Value: $name is empty." >&2
exit 1
fi
}

assert_non_empty inputs.pkgname "$pkgname"
assert_non_empty inputs.commit_username "$commit_username"
assert_non_empty inputs.commit_email "$commit_email"
assert_non_empty inputs.ssh_private_key "$ssh_private_key"

export HOME=/home/builder

echo '::group::Adding aur.archlinux.org to known hosts'
Expand Down

0 comments on commit 695685e

Please sign in to comment.