mirror of
https://github.com/balena-io/balena-cli.git
synced 2025-02-22 02:06:47 +00:00
Fix numerical id support in device rm
Change-type: patch Resolves: #2031 Signed-off-by: Scott Lowe <scott@balena.io>
This commit is contained in:
parent
ece4d88bfd
commit
f9224b05af
@ -51,7 +51,6 @@ export default class DeviceRmCmd extends Command {
|
|||||||
name: 'uuid',
|
name: 'uuid',
|
||||||
description:
|
description:
|
||||||
'comma-separated list (no blank spaces) of device UUIDs to be removed',
|
'comma-separated list (no blank spaces) of device UUIDs to be removed',
|
||||||
parse: (dev) => tryAsInteger(dev),
|
|
||||||
required: true,
|
required: true,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
@ -85,7 +84,7 @@ export default class DeviceRmCmd extends Command {
|
|||||||
// Remove
|
// Remove
|
||||||
for (const uuid of params.uuid.split(',')) {
|
for (const uuid of params.uuid.split(',')) {
|
||||||
try {
|
try {
|
||||||
await balena.models.device.remove(uuid);
|
await balena.models.device.remove(tryAsInteger(uuid));
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.info(`${err.message}, uuid: ${uuid}`);
|
console.info(`${err.message}, uuid: ${uuid}`);
|
||||||
process.exitCode = 1;
|
process.exitCode = 1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user