From dc7890cd8dbd4cc32fb15585ea7bd339f0140620 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Mon, 10 Jul 2023 22:10:38 +0100 Subject: [PATCH] refactor: improve removal of appinfo.vdf file The code has been refactored to improve the removal of the appinfo.vdf file. The find command now redirects error output to /dev/null for a cleaner execution. --- lgsm/modules/core_steamcmd.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lgsm/modules/core_steamcmd.sh b/lgsm/modules/core_steamcmd.sh index 5b2b7a609..6c84de8fd 100644 --- a/lgsm/modules/core_steamcmd.sh +++ b/lgsm/modules/core_steamcmd.sh @@ -174,8 +174,8 @@ fn_update_steamcmd_remotebuild() { fi # Removes appinfo.vdf as a fix for not always getting up to date version info from SteamCMD. - if [ "$(find "${HOME}" -type f -name "appinfo.vdf" | wc -l)" -ne "0" ]; then - find "${HOME}" -type f -name "appinfo.vdf" -exec rm -f {} \; + if [ "$(find "${HOME}" -type f -name "appinfo.vdf" 2> /dev/null | wc -l)" -ne "0" ]; then + find "${HOME}" -type f -name "appinfo.vdf" -exec rm -f {} \; 2> /dev/null fi # password for branch not needed to check the buildid