From 213f69f40822a47971c1b4545ce219e1c9b29861 Mon Sep 17 00:00:00 2001 From: aarondill Date: Wed, 5 Jul 2023 12:51:22 -0500 Subject: [PATCH] move the "detected architecture: ..." message to *after* `parse_args` This avoids logging the message when `--help` is specified, and helps ensure the correct output if `--arch` is specified --- install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index 201c1fe..6a3494a 100755 --- a/install.sh +++ b/install.sh @@ -68,8 +68,6 @@ main() { ensure get_architecture local _arch="${RETVAL}" fi - assert_nz "${_arch}" "arch" - log "Detected architecture: ${_arch}" local _bin_dir="${HOME}/.local/bin" local _bin_name @@ -81,6 +79,8 @@ main() { _man_dir=${MAN_DIR:-$_man_dir} _arch=${ARCH:-$_arch} + assert_nz "${_arch}" "arch" + log "Detected architecture: ${_arch}" case "${_arch}" in *windows*) _bin_name="zoxide.exe" ;; *) _bin_name="zoxide" ;;