Skip to content

BUG: Unchecked outFile.Close() error in runUpdateCLI #861

@andrinoff

Description

@andrinoff

Describe the bug

In runUpdateCLI() (main.go:3310), after writing the downloaded asset to disk with io.Copy, outFile.Close() is called without checking the returned error. If Close() fails (e.g., disk full), the written data may be incomplete but the update proceeds.

To reproduce

  1. Trigger an update with a nearly-full disk
  2. The file may be incomplete but the update continues

Expected behavior

outFile.Close() error should be checked and returned if non-nil.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingchoreMaintenance, refactor, cleanupgood first issueGood for newcomersneeds-responseWaiting on issue author replystaleNo activity for extended period

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions