Skip to content

Commit

Permalink
os build-config: Deprecate the --device-type parameter
Browse files Browse the repository at this point in the history
Change-type: patch
  • Loading branch information
thgreasi committed Jan 2, 2025
1 parent 81c6dd3 commit 7d233d9
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/commands/os/build-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ export default class OsBuildConfigCmd extends Command {
description: 'os image',
required: true,
}),
// TODO: Drop this arg on the next major
'device-type': Args.string({
description: 'device type',
required: true,
Expand All @@ -63,6 +64,12 @@ export default class OsBuildConfigCmd extends Command {

const { writeFile } = (await import('fs')).promises;

// the "device-type" arg will be removed on the next major - warn user
if (params['device-type'] != null) {
const { deviceTypeArgDeprecation } = await import('../../utils/messages');
console.log(deviceTypeArgDeprecation('device-type'));
}

const config = await this.buildConfig(
params.image,
params['device-type'],
Expand All @@ -74,7 +81,12 @@ export default class OsBuildConfigCmd extends Command {
console.info(`Config file "${options.output}" created successfully.`);
}

async buildConfig(image: string, deviceTypeSlug: string, advanced: boolean) {
async buildConfig(
image: string,
// TODO: Drop this parameter on the next major
deviceTypeSlug: string | undefined,
advanced: boolean,
) {
advanced = advanced || false;

const { getManifest } = await import('../../utils/helpers');
Expand Down

0 comments on commit 7d233d9

Please sign in to comment.