From 17f3cd7eeb2b89b94302f9cf01f5e52625ef07ae Mon Sep 17 00:00:00 2001 From: Phil Clifford Date: Mon, 30 Sep 2024 17:34:17 +0100 Subject: [PATCH] refactor: remove redundant code from resolve_quickemu() (#1404) * fix: remove redundant command call * fix: test local quickemu is executable --- quickget | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/quickget b/quickget index 9fbe8f4ac4..102a424ed0 100755 --- a/quickget +++ b/quickget @@ -3361,10 +3361,9 @@ function create_config() { # Use command -v command to check if quickemu is in the system's PATH and # fallback to checking if quickemu is in the current directory. -function resolve_quickemu() { - if command -v quickemu >/dev/null 2>&1; then - command -v quickemu - elif [ -f "./quickemu" ]; then +function resolve_quickemu() { + command -v quickemu || \ + if [ -x "./quickemu" ]; then echo "$(pwd)/quickemu" else echo "quickemu not found" >&2