mirror of
https://github.com/balena-io/balena-cli.git
synced 2024-12-20 22:23:07 +00:00
Print a deprecation message if you use the old os configure format
This commit is contained in:
parent
e38a0c0047
commit
49d78c56fa
@ -212,6 +212,9 @@ exports.configure = {
|
||||
if (_.filter([options.device, options.application, params.uuid]).length !== 1) {
|
||||
patterns.expectedError('To configure an image, you must provide exactly one of:\n\n* A device, with --device <uuid>\n* An application, with --app <appname>\n* [Deprecated] A device, passing its uuid directly on the command line\n\nSee the help page for examples:\n\n $ resin help os configure');
|
||||
}
|
||||
if (params.uuid) {
|
||||
console.warn('Directly passing a UUID to `resin os configure` is deprecated. Pass it with --uuid <uuid> instead.' + (params.deviceApiKey ? ' Device api keys can be passed with --deviceApiKey.\n' : '\n'));
|
||||
}
|
||||
uuid = options.device || params.uuid;
|
||||
deviceApiKey = options.deviceApiKey || params.deviceApiKey;
|
||||
console.info('Configuring operating system image');
|
||||
|
@ -252,6 +252,13 @@ exports.configure =
|
||||
|
||||
$ resin help os configure
|
||||
'''
|
||||
if params.uuid
|
||||
console.warn(
|
||||
'Directly passing a UUID to `resin os configure` is deprecated. Pass it with --uuid <uuid> instead.' +
|
||||
if params.deviceApiKey
|
||||
' Device api keys can be passed with --deviceApiKey.\n'
|
||||
else '\n'
|
||||
)
|
||||
|
||||
uuid = options.device || params.uuid
|
||||
deviceApiKey = options.deviceApiKey || params.deviceApiKey
|
||||
|
Loading…
Reference in New Issue
Block a user