Skip to content

Commit 49af2de

Browse files
committed
build(yargs): use demandCommand
1 parent 7419ddb commit 49af2de

File tree

2 files changed

+21
-9
lines changed

2 files changed

+21
-9
lines changed

.github/stale.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Number of days of inactivity before an issue becomes stale
2+
daysUntilStale: 60
3+
# Number of days of inactivity before a stale issue is closed
4+
daysUntilClose: 7
5+
# Issues with these labels will never be considered stale
6+
exemptLabels:
7+
- bug
8+
- feature
9+
- semver:major
10+
# Comment to post when marking an issue as stale. Set to `false` to disable
11+
markComment: >
12+
This issue has been automatically marked as stale because it has not had
13+
recent activity. It will be closed if no further activity occurs. Thank you
14+
for your contributions.
15+
# Comment to post when closing a stale issue. Set to `false` to disable
16+
closeComment: false

src/sequelize.js

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import helpers from './helpers/index';
1919

2020
helpers.view.teaser();
2121

22-
const cli = yargs
22+
yargs
2323
.help()
2424
.version()
2525
.command('db:migrate', 'Run pending migrations', migrate)
@@ -42,11 +42,7 @@ const cli = yargs
4242
.command(['model:generate', 'model:create'], 'Generates a model and its migration', modelGenerate)
4343
.command(['seed:generate', 'seed:create'], 'Generates a new seed file', seedGenerate)
4444
.wrap(yargs.terminalWidth())
45-
.strict();
46-
47-
const args = cli.argv;
48-
49-
// if no command then show help
50-
if (!args._[0]) {
51-
cli.showHelp();
52-
}
45+
.demandCommand(1, 'Please specify a command')
46+
.help()
47+
.strict()
48+
.argv;

0 commit comments

Comments
 (0)