From a5a9a024d48aa834b7e54498eba7e464d04962dc Mon Sep 17 00:00:00 2001 From: Jens Reyer Date: Sun, 18 Feb 2024 17:12:48 +0100 Subject: [PATCH] winetricks_set_wineprefix: warn if binary arch is unknown Currently if the binary arch can't be detected, w_die exits the function winetricks_get_file_arch, but winetricks continues. For now, only warn about this. --- src/winetricks | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/winetricks b/src/winetricks index 266bf52aa..0001f7962 100755 --- a/src/winetricks +++ b/src/winetricks @@ -5106,10 +5106,16 @@ winetricks_set_wineprefix() if test -d "${W_DRIVE_C}/windows/syswow64"; then # Check the bitness of wineserver + wine binary, used later to determine if we're on a WOW setup (no wine64) # https://github.com/Winetricks/winetricks/issues/2030 + WINESERVER_BIN="$(which "${WINESERVER}")" - _W_wineserver_binary_arch="$(winetricks_get_file_arch "${WINESERVER_BIN}")" + if ! _W_wineserver_binary_arch="$(winetricks_get_file_arch "${WINESERVER_BIN}")"; then + w_warn "Unknown file arch of ${WINESERVER_BIN}, continuing anyway." + fi + WINE_BIN="$(which "${WINE}")" - _W_wine_binary_arch="$(winetricks_get_file_arch "${WINE_BIN}")" + if ! _W_wine_binary_arch="$(winetricks_get_file_arch "${WINE_BIN}")"; then + w_warn "Unknown file arch of ${WINE_BIN}, continuing anyway." + fi # determine wow64 type (new/old) # FIXME: check what upstream is calling them