Skip to content

If server binary download fails, the broken file will be cached #2

Description

@deansheather

During download of the binary on the server (in linux via install.sh, untested on other platforms), the download is made directly to the destination file which may result in an incomplete download being left behind.

curl -sSL "$INSTALL_URL" -o $INSTALL_DIR/code-server
elif command_exists wget; then
wget -qO $INSTALL_DIR/code-server "$INSTALL_URL"

Recommendations:

  1. Download to a temp file in the same dir (such as .filename.temp1234 and then move the file to the destination once the download succeeds.
  2. Check the checksum of the downloaded file with the server. We have SHA1 checksums serverside (idk if we expose them as a file in the bin dir but we could start doing that).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions