fix(core): propagate archive extraction and copy failures

クローズ
#5,048 コメント 1 件 リアクション 0 件 担当者 1 名 GitHub で見る

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

@dgibbs64 がすでに取り組んでいます。

2026年11月1日 から。

  • #5109 @guilherme-praca による — マージ済み

評価

難易度
3/5
見積もり時間
半日
初心者へのやさしさ
42/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
bash, shell
領域
devtools

調査の方向性

Start with fn_dl_extract in lgsm/modules/core_dl.sh and trace the branch taken for an unsupported MIME type, where the function can return success without extracting anything. Then look at the selective ZIP path (extractsrc set): unzip, cp, then rm, where the final status must reflect a failed copy even if cleanup succeeds. Done means explicit errors with non-zero exit through the installer/update path, including exitbypass handling, with the listed validation cases reproduced.

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

説明

status: fixed in develop type: bug

Problem

fn_dl_extract in lgsm/modules/core_dl.sh can report successful extraction after an error, or without extracting anything.

This is the remaining extraction concern raised in #2421. The original curl-download error handling is now present and has been checked separately.

Paths to address

  • An unsupported MIME type matches none of the extraction branches. The surrounding conditional can return success, allowing the function to print an extraction success message without extracting any files.
  • In the selective ZIP extraction path (extractsrc set), the function runs unzip, then cp, then rm. The final status can reflect successful cleanup rather than a failed extraction or copy.

Expected behaviour

Unsupported archive types and failed extraction/copy operations must produce a clear error, terminate the installation/update with a non-zero exit status, and prevent later steps from reporting success. Cleanup must preserve the original failure status.

Validation

  • Unsupported archive format fails explicitly.
  • Corrupt/truncated supported archives fail.
  • Selective ZIP extraction fails when the requested source is absent or extraction fails.
  • Copy failures in selective ZIP extraction fail even when cleanup succeeds.
  • Successful full and selective extraction still work.
  • Verify failure propagation through a calling installer/update path, including any use of exitbypass.

These findings come from reviewing the current develop implementation; the extraction failure cases still require reproduction and regression checks.

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

環境構築

Codespaces で開く

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

はじめの一歩

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

GameServerManagers/LinuxGSM のほかの issue

GameServerManagers/LinuxGSM の issue をすべて見る

似ている issue

Shell/Bash の issue をもっと見る

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

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