Skip to content

Commit

Permalink
fix: udpate command target option
Browse files Browse the repository at this point in the history
  • Loading branch information
Avivbens committed Aug 23, 2023
1 parent 8c5e1a2 commit 52cfa67
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/commands/update/models/update-command.options.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export interface IUpdateCommandOptions {
version: `v.${number}.${number}.${number}` | 'latest'
target: `v.${number}.${number}.${number}` | 'latest'
}
5 changes: 2 additions & 3 deletions src/commands/update/update.command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export class UpdateCommand extends CommandRunner {
spinner.start()

try {
const { version } = options
const { target: version } = options
let downloadScript: string

switch (version) {
Expand Down Expand Up @@ -123,10 +123,9 @@ export class UpdateCommand extends CommandRunner {
}

@Option({
flags: '-t, --target <version>',
flags: '-t, --target <target>',
defaultValue: 'latest',
description: 'Select update version',
name: 'version',
})
private getVersion(version: string): string {
if (version === 'latest') {
Expand Down

0 comments on commit 52cfa67

Please sign in to comment.