diff --git a/step/clean_game_prefix.sh b/step/clean_game_prefix.sh index cd67b46..58d9379 100644 --- a/step/clean_game_prefix.sh +++ b/step/clean_game_prefix.sh @@ -85,7 +85,7 @@ if [ -z "$game_prefix" ]; then log_error "no prefix found" "$dialog" \ errorbox \ - "A prefix for the selected game could not be found.\nMake sure you have followed the instructions\non creating a clean prefix" + "A prefix for the selected game could not be found.\nMake sure you have followed the instructions on creating a clean prefix.\nCheck the terminal output for more details." exit 1 fi diff --git a/utils/protontricks.sh b/utils/protontricks.sh index bd2f296..23613c0 100755 --- a/utils/protontricks.sh +++ b/utils/protontricks.sh @@ -47,12 +47,22 @@ function apply() { } function get_prefix() { - prefix=$( \ - do_protontricks -c 'echo $WINEPREFIX' "$1" 2>/dev/null || \ - true \ + local visible=$(do_protontricks -l | grep -o "$1") + if [ -z "$visible" ]; then + return 0 + fi + + local stdout=$( \ + do_protontricks -c 'echo $WINEPREFIX' "$1" || true \ ) - if [ -d "$prefix" ]; then - echo "$prefix" + + if [ -d "$stdout" ]; then + echo "$stdout" + else + log_error \ + "Protontricks did not find a valid prefix directory. " \ + "Stdout was:\n$stdout" + return 1 fi }