Standardize winetricks exit code checks across functions

This commit is contained in:
the-sane
2025-09-26 23:26:32 -04:00
parent ecb6fc504b
commit 7fcafd39fa

View File

@@ -2391,7 +2391,7 @@ install_game_wine() {
"$winetricks_bin" -q arial tahoma dxvk powershell win11 >"$tmp_install_log" 2>&1 "$winetricks_bin" -q arial tahoma dxvk powershell win11 >"$tmp_install_log" 2>&1
exit_code="$?" exit_code="$?"
if [ "$exit_code" -eq 1 ] || [ "$exit_code" -eq 126 ]; then if [ "$exit_code" -eq 1 ] || [ "$exit_code" -eq 130 ] || [ "$exit_code" -eq 126 ]; then
# 126 = permission denied (ie. noexec on /tmp) # 126 = permission denied (ie. noexec on /tmp)
"$wine_path"/wineserver -k # Kill all wine processes "$wine_path"/wineserver -k # Kill all wine processes
progress_bar stop # Stop the zenity progress window progress_bar stop # Stop the zenity progress window
@@ -2590,7 +2590,7 @@ install_powershell() {
WINEPREFIX="$wine_prefix" "$winetricks_bin" -q powershell WINEPREFIX="$wine_prefix" "$winetricks_bin" -q powershell
exit_code="$?" exit_code="$?"
if [ "$exit_code" -eq 1 ] || [ "$exit_code" -eq 130 ]; then if [ "$exit_code" -eq 1 ] || [ "$exit_code" -eq 130 ] || [ "$exit_code" -eq 126 ]; then
progress_bar stop # Stop the zenity progress window progress_bar stop # Stop the zenity progress window
message warning "PowerShell could not be installed. See terminal output for details." message warning "PowerShell could not be installed. See terminal output for details."
else else
@@ -2624,7 +2624,7 @@ dxvk_update_wine() {
WINEPREFIX="$wine_prefix" "$winetricks_bin" -f dxvk WINEPREFIX="$wine_prefix" "$winetricks_bin" -f dxvk
exit_code="$?" exit_code="$?"
if [ "$exit_code" -eq 1 ] || [ "$exit_code" -eq 130 ]; then if [ "$exit_code" -eq 1 ] || [ "$exit_code" -eq 130 ] || [ "$exit_code" -eq 126 ]; then
progress_bar stop # Stop the zenity progress window progress_bar stop # Stop the zenity progress window
message warning "DXVK could not be installed. See terminal output for details." message warning "DXVK could not be installed. See terminal output for details."
else else