Skip to content

Commit

Permalink
fix: command template (#1101)
Browse files Browse the repository at this point in the history
  • Loading branch information
mdonnalley committed Feb 6, 2023
1 parent 80a7838 commit 80670ef
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions templates/src/command.ts.ejs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {Command, Flags} from '@oclif/core'
import {Args, Command, Flags} from '@oclif/core'
<%_ const klass = _.upperFirst(_.camelCase(name)) _%>

export default class <%- klass %> extends Command {
Expand All @@ -15,7 +15,9 @@ export default class <%- klass %> extends Command {
force: Flags.boolean({char: 'f'}),
}

static args = [{name: 'file'}]
static args = {
file: Args.string({description: 'file to read'}),
}

public async run(): Promise<void> {
const {args, flags} = await this.parse(<%- klass %>)
Expand Down

0 comments on commit 80670ef

Please sign in to comment.