Skip to content

Commit

Permalink
double check install by looking for the two executable files
Browse files Browse the repository at this point in the history
also set xtrace so I can see what is being done in the CI
  • Loading branch information
tomeichlersmith committed Sep 6, 2023
1 parent b228e3e commit 3707280
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion install
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
# POSIX
set -o errexit
set -o nounset
set -o xtrace

_denv_info() {
printf "\033[32;1m INFO: \033[0m\033[32m%s\n" "$1"
Expand Down Expand Up @@ -247,7 +248,22 @@ if [ "${simple}" -eq "0" ]; then
ln -sf denv '\'
fi

_denv_info "Successfully installed denv to ${dest_path}"
# double check that the installation is functional
unset DENV_INSTALL_FAILURE
for executable in "denv" "_denv_entrypoint"; do
if [ -x "${dest_path}/${executable}" ] && [ -f "${dest_path}/${executable}" ]; then
continue
fi
_denv_error "'${executable}' does not exist as an executable file at '${dest_path}/${executable}'"
DENV_INSTALL_FAILURE=1
done

if [ -z "${DENV_INSTALL_FAILURE+x}" ]; then
_denv_info "Successfully installed denv to ${dest_path}"
else
_denv_error "Installation corrupted!"
fi

case "${PATH}" in
*"${dest_path}"*)
_denv_info "Found ${dest_path} in PATH, you're all set!"
Expand Down

0 comments on commit 3707280

Please sign in to comment.