Skip to content

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

Closed
@deansheather

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).

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