From 8eeee56ee165909df13978c902e1cd61efed9965 Mon Sep 17 00:00:00 2001 From: Mikhail Tergoev Date: Fri, 10 Oct 2025 13:15:37 +0300 Subject: [PATCH] print_error if exe file not found for desktop --- winehelper | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/winehelper b/winehelper index f208f71..7773e5b 100755 --- a/winehelper +++ b/winehelper @@ -553,8 +553,6 @@ create_desktop () { if [[ -z "$name_desktop" ]] || [[ -z "$exe_file" ]] ; then fatal "Использование: $0 desktop \"Имя ярлыка\" \"/путь/к/файлу.exe\" [иконка|auto] [имя_desktop_файла]" elif [[ ! -f "$exe_file" ]] ; then - print_warning "Для создания ярлыка не найден исполняемый файл: $exe_file" - local BASENAME_EXE="$(basename "$exe_file")" print_info "Запускаем поиск $BASENAME_EXE" local FIND_PATH @@ -565,9 +563,11 @@ create_desktop () { exe_file="$(find "$FIND_PATH" -type f -not -type l \ -not -path "*/windows/*" -not -path "*/dosdevices/*" \ -iname "$BASENAME_EXE")" - if [[ -z "$exe_file" ]] || [[ ! -f "$exe_file" ]] - then fatal "Для создания ярлыка не найден исполняемый файл: $BASENAME_EXE" - else print_ok "Исполняемый файл $BASENAME_EXE найден по пути: $(dirname "$exe_file")/" + if [[ -z "$exe_file" ]] || [[ ! -f "$exe_file" ]] ; then + print_error "Для создания ярлыка не найден исполняемый файл: $BASENAME_EXE" + return 1 + else + print_ok "Исполняемый файл $BASENAME_EXE найден по пути: $(dirname "$exe_file")/" fi fi