refactor: remove redundant code from resolve_quickemu() (#1404)

* fix: remove redundant command call

* fix: test local quickemu is executable
This commit is contained in:
Phil Clifford 2024-09-30 17:34:17 +01:00 committed by GitHub
parent 42ee12d51c
commit 17f3cd7eeb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 4 deletions

View File

@ -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