Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Every knex command prints usage first #3618

Closed
demisx opened this issue Jan 9, 2020 · 3 comments
Closed

Every knex command prints usage first #3618

demisx opened this issue Jan 9, 2020 · 3 comments

Comments

@demisx
Copy link

demisx commented Jan 9, 2020

Not sure why, but every knex command I run now prints usage. Even a simple one like this first prints usage and then outputs the results:

$ npx knex -V
Usage:  [options] [command]
Options:
  -V, --version                   output the version number
  --debug                         Run with debugging.
  --knexfile [path]               Specify the knexfile path.
  --knexpath [path]               Specify the path to knex instance.
  --cwd [path]                    Specify the working directory.
  --client [name]                 Set DB client without a knexfile.
  --connection [address]          Set DB connection without a knexfile.
  --migrations-directory [path]   Set migrations directory without a knexfile.
  --migrations-table-name [path]  Set migrations table name without a knexfile.
  --env [name]                    environment, default: process.env.NODE_ENV || development
  -h, --help                      output usage information

Commands:
  init [options]                          Create a fresh knexfile.
  migrate:make [options] <name>           Create a named migration file.
  migrate:latest [options]                Run all migrations that have not yet been run.
  migrate:up [<name>]                     Run the next or the specified migration that has not yet been run.
  migrate:rollback [options]              Rollback the last batch of migrations performed.
  migrate:down [<name>]                   Undo the last or the specified migration that was already run.
  migrate:currentVersion                  View the current version for the migration.
  migrate:list|migrate:status             List all migrations files with status.
  seed:make [options] <name>              Create a named seed file.
  seed:run [options]                      Run seed files.
Knex CLI version: 0.20.7
Knex Local version: 0.20.7
# Environment
Knex version: 0.20.7
Database + version: PostgreSQL 11
OS: 10.15.2
@simon-lorenz
Copy link
Contributor

simon-lorenz commented Jan 10, 2020

I have the same problem with 0.20.7 while 0.20.6 seems fine.

This issue seems to be related to commit df2ace1. I forked the project, reverted the commit and the usage output disappears.

@timorthi
Copy link
Contributor

There's an open PR to fix this right now: #3617

@yeonhoyoon
Copy link
Contributor

This issue is fixed in 0.20.8.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants