Skip to content

Failure-prone upgrade sequence #2

@benar-m

Description

@benar-m

The current script removes the existing Go installation ($SUDOCMD rm -rf "$GOROOT"/*) before verifying that the new version has been successfully downloaded and extracted. This introduces a critical failure point: if the download fails due to network issues, permission errors, or corrupted archives, the system is left without a working Go environment. Maybe Only after verifying a successful installation should it replace the existing Go installation, ensuring reliability and preventing system breakage.

Race Condition Vulnerability
Between deleting the old installation and extracting the new one, there's a window where Go is completely unavailable
This could break running Go processes or builds

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions