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

Aperta
#5,189 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Una pull request collegata è già stata integrata.

  • #5190 di @borzaka — integrata

Valutazione

Difficoltà
1/5
Tempo stimato
Meno di un'ora
Idoneità per principianti
25/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Ferma
Stack tecnologico
bash, shell
Ambito
cli

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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

Lingua principale
Shell
Stelle
4.9k
Fork
870
Merge medio
18h 44m
PR unite (30g)
148

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di GameServerManagers/LinuxGSM

Tutte le issue di GameServerManagers/LinuxGSM

Issue simili

Altre issue su Shell/Bash

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.