Skip to content

Commit

Permalink
[Arma 3 & DayZ] Fix SteamCMD error checking (#276)
Browse files Browse the repository at this point in the history
* Fix SteamCMD error checking

Added `libcurl` as an excluded keyword for error checking. Was causing mod-timeout errors to be misreported as an unknown error.
  • Loading branch information
redthirten authored Dec 20, 2024
1 parent bbc22b5 commit 9ce202d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 3 additions & 2 deletions games/arma3/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,9 @@ function RunSteamCMD { #[Input: int server=0 mod=1 optional_mod=2; int id]

# Error checking for SteamCMD
steamcmdExitCode=${PIPESTATUS[0]}
loggedErrors=$(grep -i "error\|failed" "${STEAMCMD_LOG}" | grep -iv "setlocal\|SDL\|steamservice\|thread")
if [[ -n ${loggedErrors} ]]; then # Catch errors (ignore setlocale, SDL, steamservice, and thread priority warnings)
# Catch errors (ignore setlocale, SDL, steamservice, thread priority, and libcurl warnings)
loggedErrors=$(grep -i "error\|failed" "${STEAMCMD_LOG}" | grep -iv "setlocal\|SDL\|steamservice\|thread\|libcurl")
if [[ -n ${loggedErrors} ]]; then
# Soft errors
if [[ -n $(grep -i "Timeout downloading item" "${STEAMCMD_LOG}") ]]; then # Mod download timeout
echo -e "\n${YELLOW}[UPDATE]: ${NC}Timeout downloading Steam Workshop mod: \"${CYAN}${modName}${NC}\" (${CYAN}${2}${NC})"
Expand Down
4 changes: 3 additions & 1 deletion games/dayz/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@ function RunSteamCMD { #[Input: int server=0 mod=1; int id]

# Error checking for SteamCMD
steamcmdExitCode=${PIPESTATUS[0]}
if [[ -n $(grep -i "error\|failed" "${STEAMCMD_LOG}" | grep -iv "setlocal\|SDL\|thread") ]]; then # Catch errors (ignore setlocale, SDL, and thread priority warnings)
# Catch errors (ignore setlocale, SDL, steamservice, thread priority, and libcurl warnings)
loggedErrors=$(grep -i "error\|failed" "${STEAMCMD_LOG}" | grep -iv "setlocal\|SDL\|steamservice\|thread\|libcurl")
if [[ -n ${loggedErrors} ]]; then
# Soft errors
if [[ -n $(grep -i "Timeout downloading item" "${STEAMCMD_LOG}") ]]; then # Mod download timeout
echo -e "\n${YELLOW}[UPDATE]: ${NC}Timeout downloading Steam Workshop mod: \"${CYAN}${modName}${NC}\" (${CYAN}${2}${NC})"
Expand Down

0 comments on commit 9ce202d

Please sign in to comment.