[Bug]: install passes a leftover forcedl value instead of each server's force setting

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

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

関連するプルリクエストがすでにマージされています。

  • #5190 @borzaka による — マージ済み

評価

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

調査の方向性

Read lgsm/modules/install_server_files.sh around line 233 and check the force= assignments in its server branches. The issue identifies the mismatch: the fn_fetch_file call passes ${forcedl} instead of ${force}. Confirm the expected argument with the reported samp reproduction; done means the call passes the branch’s noforce setting.

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

説明

command: install info: steamcmd reproducible: unable severity: low status: fixed in develop type: bug
Severity

severity: low

Reproducibility

reproducible: unable

Regression

regression: no

Affects latest release

latest-release: yes

User story

As a LinuxGSM maintainer, I want fn_install_server_files to pass the download setting each server defines, so that install does not depend on a value left over from an earlier download.

Script name

all servers installed by fn_install_server_files

Game

Other

Linux distro

Other

Command

command: install

Expected behavior

fn_fetch_file gets the force="noforce" value that each of the 27 server branches in fn_install_server_files sets.

Actual behavior

The call in lgsm/modules/install_server_files.sh line 233 passes ${forcedl}, which no branch sets, so it gets whatever the last fn_fetch_file call left in the global forcedl. Today that is always noforce: the module is loaded by fn_fetch_module just before, and the downloads in between (EULA, SteamCMD) also pass noforce. There is no visible effect today.

Further information

85290d6b ("corrected download settings", 2017-05-14) changed the argument in the call from ${force} to ${forcedl} but did not rename the force= assignments, and it has stayed that way since (the file later moved from lgsm/functions to lgsm/modules). The bug is latent: if a download that passes "forcedl" (for example install_config.sh or an update module) ever ran just before this function, install would download the archive again despite force="noforce". The fix is to pass ${force} in the call; force is not used anywhere else in lgsm/.

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

Not applicable: found by code review of develop, not on a live server.

Relevant log output
# fn_install_server_files with shortname=samp and forcedl="forcedl" left from an earlier call,
# fn_fetch_file stubbed to print its 9th argument
develop (b3d24bec): fn_fetch_file arg9 (forcedl) = forcedl
Steps to reproduce
  1. Source fn_install_server_files from lgsm/modules/install_server_files.sh with fn_fetch_file, fn_dl_extract and fn_clear_tmp stubbed.
  2. Set shortname=samp and forcedl="forcedl", then call fn_install_server_files.
  3. fn_fetch_file receives forcedl instead of the branch's noforce.

🤖 Generated with Claude Code

主要言語
Shell
スター
4.9k
フォーク
870
平均マージ
18時間 44分
マージ済み PR(30日)
148

環境構築

Codespaces で開く

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

はじめの一歩

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

GameServerManagers/LinuxGSM のほかの issue

GameServerManagers/LinuxGSM の issue をすべて見る

似ている issue

Shell/Bash の issue をもっと見る

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

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