Skip to content
This repository has been archived by the owner on Jan 14, 2025. It is now read-only.

Don't suppress protontricks error messages when getting prefix #631

Merged
merged 1 commit into from
May 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion step/clean_game_prefix.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
20 changes: 15 additions & 5 deletions utils/protontricks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
Loading