Skip to content

Commit

Permalink
Fail if install location does not exist
Browse files Browse the repository at this point in the history
Authored-by: Owen Nelson <[email protected]>
  • Loading branch information
tw-owen-nelson committed Jan 11, 2024
1 parent b74f041 commit 3525304
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -105,12 +105,11 @@ function run() {
download $CHECKSUM_FILE_NAME

pushd "$TEMP_DIR" >/dev/null 2>&1
grep "$TALISMAN_BINARY_NAME" $CHECKSUM_FILE_NAME >$CHECKSUM_FILE_NAME.single

if ! command -v shasum &> /dev/null; then
sha256sum -c $CHECKSUM_FILE_NAME.single
sha256sum --ignore-missing -c $CHECKSUM_FILE_NAME
else
shasum -a 256 -c $CHECKSUM_FILE_NAME.single
shasum -a 256 --ignore-missing -c $CHECKSUM_FILE_NAME
fi
popd >/dev/null 2>&1
echo_debug "Checksum verification successfully!"
Expand All @@ -135,6 +134,11 @@ function run() {
fi
}

if [ ! -d "$INSTALL_LOCATION" ]; then
echo_error "$INSTALL_LOCATION is not a directory!"
exit 1
fi

set_talisman_binary_name

echo_success "Downloading talisman binary"
Expand Down

0 comments on commit 3525304

Please sign in to comment.