Skip to content

Commit

Permalink
fix(fctrserver): parse updated version string correctly (#4688)
Browse files Browse the repository at this point in the history
  • Loading branch information
Amlinde authored Oct 26, 2024
1 parent cac8b81 commit 53a7c70
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lgsm/modules/info_game.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
2 changes: 1 addition & 1 deletion lgsm/modules/update_fctr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 53a7c70

Please sign in to comment.