update
Install the newest version of this CLI.
writesrepeatableno sign-in
Replaces this binary with the newest release, using whichever way it was installed in the first place.
--check reports what it would do without doing it. An exit code of 9 from any
other command means the API has stopped serving this release, and this is what
fixes it.
Usage
outplane update [flags]Flags
| Flag | Type | Description |
|---|---|---|
--check | bool | Report the install method and the command, without running it. |
This command does not accept --team. Every other global flag applies.
Output
| Field | Type | Description |
|---|---|---|
method | string | Npm | the install script | unknown. |
path | string | The binary that would be replaced. |
version | string | null | The version of the binary at path. After an update that is the new one, read back from disk; null when it could not be read. |
command | string | null | What updates this installation, null when it is not managed. |
ran | bool | False with --check, and whenever nothing was run. |
Examples
See how this CLI would update itself
outplane update --check{
"command": "npm install -g outplane@latest",
"method": "npm",
"ran": false
}Update now
outplane updateRead the version and channel in a script
outplane update --check --json --fields version,methodUpdate to the newest release
outplane updateWhat to Know
- --check never runs anything and makes no change, whatever the environment.
- An installation that is not managed by npm or the install script exits 2 with update.unmanaged. Whatever put the binary there is what should replace it.
- Exit code 9 from any other command means the API has stopped serving this release, and this is the command that fixes it.
- The new version is not loaded by the running process. Later commands use it; this one finishes as the version it started as.
Errors
Beyond 0 for success, this command exits with:
| Exit | Kind | Meaning |
|---|---|---|
1 | internal | An unexpected failure in the CLI itself. |
2 | usage | Invalid arguments, unknown flag, or client-side validation failure. |
The code on the error object is one of update.unmanaged, update.failed. Branch on that, or on the exit status. The message is prose and changes.