mirror of
https://github.com/balena-io/balena-cli.git
synced 2025-06-20 08:43:44 +00:00
v12 preparations: Add version switch, update login message.
Change-type: patch Connects-to: #1770 Signed-off-by: Scott Lowe <scott@balena.io>
This commit is contained in:
@ -25,6 +25,9 @@ import * as ShellEscape from 'shell-escape';
|
||||
import { ExpectedError } from '../errors';
|
||||
import { getBalenaSdk, getChalk, getVisuals } from './lazy';
|
||||
|
||||
import * as semver from 'semver';
|
||||
import { version } from '../../package.json';
|
||||
|
||||
export function getGroupDefaults(group: {
|
||||
options: Array<{ name: string; default?: string }>;
|
||||
}): { [name: string]: string | number | undefined } {
|
||||
@ -465,3 +468,7 @@ export function getProxyConfig(): ProxyConfig | undefined {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export function isVersionGTE(v: string) {
|
||||
return semver.gte(process.env.BALENA_CLI_VERSION_OVERRIDE || version, v);
|
||||
}
|
||||
|
Reference in New Issue
Block a user