luna upgrade
Replace the luna CLI with the version Luna runs, or with a version you name.
luna upgrade replaces this luna CLI with the version Luna runs, so the two match.
luna upgrade
Reference
luna upgrade [OPTIONS]
| Option | Type | Default | Does |
|---|---|---|---|
--version <VERSION> |
text | The version Luna runs | Installs this version instead, such as 0.0.27. A leading v is allowed. |
Good to know
- The CLI asks Luna which version it runs, and downloads that build for this machine from Luna. When Luna has no build of that version, it downloads one from Luna’s releases instead.
- A download from Luna is checked against its size and SHA-256 hash. The new CLI must then start and report the version asked for. If any check fails, nothing changes.
- The new CLI replaces the old one in place, in the same folder. Run the command as a user who can write there, with
sudoif the folder needs it. - When the version asked for is installed already, nothing changes.
- Every command that reaches Luna warns on standard error when this CLI’s version differs from Luna’s. An older CLI turns away what a newer SDK writes, and a newer one asks for what Luna does not have yet. Set
LUNA_NO_VERSION_CHECK=1to turn the warning off.
Examples
Match the version Luna runs
luna upgrade
Install one version
luna upgrade --version 0.0.26
Upgrade a CLI in a folder only root can write to
sudo luna upgrade