command_runner/helpers/cli_updater library
Classes
- CliUpdater
- Installs a newer version of the CLI and reruns the current command with it.
- DartCliUpdater
- A CliUpdater that installs the CLI from pub with the Dart SDK.
Enums
- CliInstallation
- How the running CLI was installed, which decides how it is updated and how it is invoked again.
Constants
- cliUpdateAttemptedEnvName → const String
- The environment variable naming the version a preceding process already attempted to install.
Functions
-
attemptedCliUpdateVersion(
[Map< String, String> ? environment]) → Version? - The version a preceding process already attempted to install, if any.
-
installArguments(
CliInstallation installation, {required Version version}) → List< String> -
The
dartarguments that installversionforinstallation. -
rerunInvocation(
List< String> args, {required CliInstallation installation, required String invokedExecutable, required String resolvedExecutable, required String scriptPath}) → ({List<String> args, String executable}) -
The executable and arguments that rerun this CLI with
args. -
resolveCliInstallation(
{required String resolvedExecutable, required String scriptPath}) → CliInstallation - The installation the running CLI belongs to.
Exceptions / Errors
- CliUpdateFailedException
- Thrown when installing a new version of the CLI failed.