Skip to content
This repository has been archived by the owner on Sep 18, 2020. It is now read-only.

Add check for gpg tool #822

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Add check for gpg tool #822

wants to merge 1 commit into from

Conversation

Akasurde
Copy link

if gpg tool is not available then we should should break early.

Signed-off-by: Abhijeet Kasurde [email protected]

# GPG tools required
which gpg &>/dev/null
if [ $? -ne 0 ]; then
echo "$0: GPG tool is required to verify GPG signature." >&2
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: s/GPG tool/gpg/

if gpg tool is not available then we should should break early.

Signed-off-by: Abhijeet Kasurde <[email protected]>
@Akasurde
Copy link
Author

@lucab Done.

Copy link
Contributor

@dm0- dm0- left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@@ -39,6 +39,13 @@ if [ $? -ne 0 ]; then
exit 1
fi

# GPG tools required
which gpg &>/dev/null
if [ $? -ne 0 ]; then

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In general, you'd want to wrap vars with double quotes "$?". It's just that it this case it would always have some return code, but for arbitrary var it might end up being interpolated as if [ -ne 0 ]; then in case of empty var/string, which would lead to syntax error being raised by shell interpreter.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants