Skip to content

Commit

Permalink
feat(detect): if steam and yad not found stop the program
Browse files Browse the repository at this point in the history
  • Loading branch information
Mte90 committed Mar 15, 2024
1 parent 8bcc2af commit d04efdb
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions steamtinkerlaunch
Original file line number Diff line number Diff line change
Expand Up @@ -618,6 +618,12 @@ function setSteamPath {
}

function setSteamPaths {
if [ ! -x "$(command -v "steam")" ]; then
echo "ERROR" "${FUNCNAME[0]} - Steam not found"
writelog "ERROR" "${FUNCNAME[0]} - Steam not found"
exit 0
fi

if [ -f "$STPAVARS" ] && grep -q "^SUSDA" "$STPAVARS" ; then
writelog "INFO" "${FUNCNAME[0]} - Reading Steam Path variables from '$STPAVARS'"
loadCfg "$STPAVARS" X
Expand Down Expand Up @@ -18243,6 +18249,11 @@ function checkIntDeps {
if [ -z "$YAD" ]; then
YAD="$(command -v "yad")"
fi

if [ "$YAD" ]; then
writelog "ERROR" "${FUNCNAME[0]} - Could not find yad" "E"
exit 0
fi

if [ -n "$YAD" ] && [ ! -f "$YAD" ]; then
OYAD="$YAD"
Expand Down

0 comments on commit d04efdb

Please sign in to comment.