mirror of
https://github.com/balena-io/balena-cli.git
synced 2025-06-23 10:05:22 +00:00
errors: Add expected errors for device deactivation
Change-type: patch Signed-off-by: Marios Balamatsias <mbalamatsias@gmail.com>
This commit is contained in:
@ -71,15 +71,16 @@ export default class DeviceDeactivateCmd extends Command {
|
||||
|
||||
const uuid = params.uuid;
|
||||
const deactivationWarning = `
|
||||
|
||||
Warning! Deactivating a device will charge a fee equivalent to the
|
||||
normal monthly cost for the device (e.g. $1 for an essentials device);
|
||||
the device will not be charged again until it comes online.
|
||||
`;
|
||||
|
||||
Are you sure you want to deactivate device ${uuid} ?`;
|
||||
const warning = `Are you sure you want to deactivate device ${uuid} ?`;
|
||||
|
||||
console.error(deactivationWarning);
|
||||
// Confirm
|
||||
await patterns.confirm(options.yes, deactivationWarning);
|
||||
await patterns.confirm(options.yes, warning);
|
||||
// Deactivate
|
||||
await balena.models.device.deactivate(uuid);
|
||||
}
|
||||
|
Reference in New Issue
Block a user