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

未关闭
#5,189 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

已经有一个关联 PR 被合并了。

  • #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 分钟
30 天内合并 PR
148

环境准备

在 Codespaces 中打开

在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

GameServerManagers/LinuxGSM 的其他 Issue

查看 GameServerManagers/LinuxGSM 的全部 Issue

相似的 Issue

更多 Shell/Bash Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。