Skip to content

Commit

Permalink
Adding GPG check
Browse files Browse the repository at this point in the history
Signed-off-by: Janos Bonic <[email protected]>
  • Loading branch information
Janos Bonic committed Jan 5, 2024
1 parent 5f6f17f commit 114f604
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/install-opentofu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,10 @@ download_gpg() {
log_error "Bug: no destination passed to download_gpg."
return $TOFU_INSTALL_EXIT_CODE_INVALID_ARGUMENT
fi
if ! command_exists "gpg"; then
log_error "Missing gpg binary."
return $TOFU_INSTALL_EXIT_CODE_INSTALL_METHOD_NOT_SUPPORTED
fi
log_debug "Downloading GPG key from ${1} to ${2}..."
if ! download_tool_exists; then
return $TOFU_INSTALL_EXIT_CODE_DOWNLOAD_TOOL_MISSING
Expand Down

0 comments on commit 114f604

Please sign in to comment.