nsc version check checks whether the installed nsc binary is the latest
version, without modifying it. By default (--latest), it checks whether a
newer version is available. With --at_least, it instead checks whether the
current version satisfies a minimum version constraint, which is useful for
scripts that require a particular baseline feature set rather than the
absolute newest release.
The command communicates its result through its exit code, making it suitable
for use in CI pipelines and scripts: it exits with code 0 if the version is
up to date (or the --at_least constraint is met), and exits with code 2
if the version is outdated (or the constraint is not met).
Usage
Example
Output
Options
—at_least string
Check if the current version is at least the given version, instead of checking for the newest available version. This does not check whether a newer version is available — only whether the installed version meets or exceeds the constraint you provide.—latest
Check if a newer version is available. Enabled by default (--latest=true);
this is the standard mode used when you just want to know whether you’re
running the latest nsc release.
—quiet
Suppress successful output. When set,nsc version check only prints output
if the version is outdated (or the --at_least constraint is not met),
making it easier to use in scripts where you only care about the failure
case.
Related Topics
- nsc version - Output the compiled version of the CLI