Skip to main content

skl update

Download the latest GitHub Release for this machine and replace the binary that is running. skl upgrade is an alias.

Synopsis​

skl update
skl update --force
skl upgrade

Flags​

  • --force. Download and replace even when the installed binary already matches the latest release checksum.

Environment​

  • SKL_DOWNLOAD_BASE. Asset origin. Default is https://github.com/x0ba/skl/releases/latest/download, the same as the installer.

What it does​

  1. Resolves the release triple for this OS and architecture: x86_64-unknown-linux-musl, aarch64-unknown-linux-musl, x86_64-apple-darwin, aarch64-apple-darwin, or x86_64-pc-windows-gnu.
  2. Downloads SHA256SUMS from the asset origin.
  3. Stops with already up to date when the current binary matches the checksum for its triple, unless --force is set.
  4. Downloads skl-<triple>, or skl-<triple>.exe on Windows, and checks its SHA-256.
  5. Writes the download next to the current binary, runs --version on it, and replaces the binary only when that succeeds.

Config, state.db, the library, and shell configuration files do not change. A checksum mismatch or a failed download leaves the current binary in place. Two skl update processes on the same install use separate staging files and a lock around the replacement.

Output​

==> latest v0.4.2
==> fetching SHA256SUMS
==> downloading https://github.com/x0ba/skl/releases/latest/download/skl-aarch64-apple-darwin
==> checksum ok (skl-aarch64-apple-darwin)
==> updated /home/you/.local/bin/skl (0.4.1 -> v0.4.2)
skl 0.4.2

Errors​

  • config: unsupported platform <os>/<arch> for skl update (need a GitHub Release triple)
  • config: SHA256SUMS has no entry for <asset>
  • config: checksum mismatch for <asset> (got <hash>, want <hash>)
  • config: new binary failed --version (<detail>). The download matched its checksum but did not run. The previous binary is unchanged.
  • config: cannot resolve this skl binary: <error>
  • Network errors from the asset origin.