Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
deansheather opened this issue Jan 4, 2023 · 0 comments
Closed
Assignees

Comments

@deansheather
Copy link
Member

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).
kylecarbs added a commit that referenced this issue Jan 10, 2023
@kylecarbs kylecarbs self-assigned this Jan 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants