[Bug]: update-lgsm prints "fn_print_plain_flush: command not found" when updating from before v26.5.0

オープン 初心者向け
#5,242 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
84/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
bash, linux, shell
領域
backend, cli

調査の方向性

lgsm/modules/core_exit.shの22行目付近から始め、fn_print_plain_flushの呼び出しを、core_modules.shにあるfn_fetch_core_dlのガードと比較してください。Issueの説明どおりにv26.4.0のインスタンスを作成し、masterに対してupdate-lgsmを実行して再現します。この最初の更新がシェルエラーなしで完了し、正常終了すれば完了です。

索引モデルが issue の本文から書いたものです。

説明

command: update-lgsm distro: Debian engine: source2 game: Counter-Strike 2 regression: yes reproducible: always severity: low type: bug
Severity

severity: low

Reproducibility

reproducible: always

Regression

regression: yes

Affects latest release

latest-release: yes

User story

As a server admin who updates an old LinuxGSM install, I want update-lgsm to finish without a shell error, so that I can tell the update worked.

Script name

cs2server (reproduced with ts3server; any server is affected)

Game

Counter-Strike 2

Linux distro

Debian 13

Command

command: update-lgsm

Expected behavior

update-lgsm prints [ OK ] Updating LinuxGSM <server>: Updating modules and exits.

Actual behavior

Right after that line it prints core_exit.sh: line 22: fn_print_plain_flush: command not found. The exit code is still 0.

Further information

update-lgsm replaces the modules on disk while the running script still has the old core_messages.sh loaded. It then runs core_exit.sh, which is now the new file. Since #5117 (v26.5.0), core_exit.sh calls fn_print_plain_flush unconditionally, and an old core_messages.sh does not define it. This happens once, when updating from a version older than v26.5.0. Guarding the call with type, as core_modules.sh does for fn_fetch_core_dl, avoids it.

Pre-checks
  • I ran update and validate before reporting this issue.

Not run: reproduced by running update-lgsm itself on a new test instance.

Relevant log output
# ts3server created from v26.4.0, Debian 13 (WSL2), modulesversion="v26.4.0".
$ LGSM_GITHUBBRANCH=master ./ts3server update-lgsm
checking GitHub module [ install_logs.sh ] ... UPDATE
fetching GitHub [ install_logs.sh ] ... OK
[  OK  ] Updating LinuxGSM ts3server: Updating modules
/home/user/ts3server/lgsm/modules/core_exit.sh: line 22: fn_print_plain_flush: command not found
$ echo $?
0
# A second update-lgsm prints no error.
Steps to reproduce
  1. Create an instance from v26.4.0: curl -Lo linuxgsm.sh https://raw.githubusercontent.com/GameServerManagers/LinuxGSM/v26.4.0/linuxgsm.sh && chmod +x linuxgsm.sh && LGSM_GITHUBBRANCH=v26.4.0 bash linuxgsm.sh ts3server.
  2. Run one command so the v26.4.0 modules are downloaded: LGSM_GITHUBBRANCH=v26.4.0 ./ts3server details.
  3. Run LGSM_GITHUBBRANCH=master ./ts3server update-lgsm. The error is printed after Updating modules.

🤖 Generated with Claude Code

主要言語
Shell
スター
4.9k
フォーク
866
平均マージ
17時間 58分
マージ済み PR(30日)
100

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

GameServerManagers/LinuxGSM のほかの issue

GameServerManagers/LinuxGSM の issue をすべて見る

似ている issue

Shell/Bash の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。