This commit is contained in:
Mauricio Siu
2024-06-22 17:01:47 -06:00
parent 3b12f55ae4
commit 791f8c96c3

View File

@@ -1,30 +0,0 @@
import {Args, Command, Flags} from '@oclif/core'
export default class CheckServer extends Command {
static override args = {
file: Args.string({description: 'file to read'}),
}
static override description = 'describe the command here'
static override examples = [
'<%= config.bin %> <%= command.id %>',
]
static override flags = {
// flag with no value (-f, --force)
force: Flags.boolean({char: 'f'}),
// flag with a value (-n, --name=VALUE)
name: Flags.string({char: 'n', description: 'name to print'}),
}
public async run(): Promise<void> {
const {args, flags} = await this.parse(CheckServer)
const name = flags.name ?? 'world'
this.log(`hello ${name} from /Users/mauricio/Documents/Github/Personal/cli/src/commands/check-server.ts`)
if (args.file && flags.force) {
this.log(`you input --force and --file: ${args.file}`)
}
}
}