From 3dabf33eaf5d111cac5934369080f6c511208a00 Mon Sep 17 00:00:00 2001 From: Alex Linde <38871119+Amlinde@users.noreply.github.com> Date: Sat, 26 Oct 2024 15:45:36 -0500 Subject: [PATCH] fix(fctrserver): parse updated version string correctly (#4688) --- lgsm/modules/info_game.sh | 2 +- lgsm/modules/update_fctr.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lgsm/modules/info_game.sh b/lgsm/modules/info_game.sh index a9d9834b08..62292ffa03 100644 --- a/lgsm/modules/info_game.sh +++ b/lgsm/modules/info_game.sh @@ -1310,7 +1310,7 @@ fn_info_game_fctr() { # get server version if installed. local factoriobin="${executabledir}${executable:1}" if [ -f "${factoriobin}" ]; then - serverversion="$(${factoriobin} --version | grep "Version:" | awk '{print $2}')" + serverversion="$(${factoriobin} --version | grep -m 1 "Version:" | awk '{print $2}')" fi } diff --git a/lgsm/modules/update_fctr.sh b/lgsm/modules/update_fctr.sh index b648123192..b493866542 100644 --- a/lgsm/modules/update_fctr.sh +++ b/lgsm/modules/update_fctr.sh @@ -20,7 +20,7 @@ fn_update_localbuild() { # Uses executable to get local build. if [ -d "${executabledir}" ]; then cd "${executabledir}" || exit - localbuild=$(${executable} --version | grep "Version:" | awk '{print $2}') + localbuild=$(${executable} --version | grep -m 1 "Version:" | awk '{print $2}') fi if [ -z "${localbuild}" ]; then fn_print_error "Checking local build: ${remotelocation}: missing local build info"