question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

knex cli tool doesn't take --cwd option

See original GitHub issue

There’s code to read it from argv.cwd, but you can’t specify it - it goes error: unknown option --cwd. We kinda need it, because we don’t want the working directory to change when we run knex.

Issue Analytics

  • State:closed
  • Created 9 years ago
  • Reactions:1
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
SohumBcommented, Jun 16, 2014

No, you can’t, actually - if you specify a knexfile in a different directory, it chdirs to that directory… for some reason.

Thanks for the fix! On Jun 17, 2014 12:06 AM, “Tyler Kellen” notifications@github.com wrote:

This is fixed in #327 https://github.com/tgriesser/knex/pull/327 but you can solve this problem now by using the --knexfile option, passing the full path to your knexfile.

— Reply to this email directly or view it on GitHub https://github.com/tgriesser/knex/issues/326#issuecomment-46182170.

0reactions
tkellencommented, Jun 16, 2014

Definitely sounds like a case for using the migration API.

Read more comments on GitHub >

github_iconTop Results From Across the Web

knex cli tool doesn't take --cwd option · Issue #326 - GitHub
There's code to read it from argv.cwd , but you can't specify it - it goes error: unknown option --cwd . We kinda...
Read more >
How to use the Knex CLI - Stack Overflow
First type in "npx knex" to access options and commands available to the knex module. To be able to make use of the...
Read more >
Changelog - Knex.js
Increment / decrement returns the number of affectedRows (#330). Allow --cwd option flag to be passed to CLI tool (#326). 0.6.15 - June...
Read more >
knex-migrator - npm
knex -migrator. A database migration tool for knex.js, which supports MySQL and SQlite3. Features. [x] JS API; [x] CLI Tool ...
Read more >
Configuration - MikroORM
cwd () there to always have the same base path regardless of how you run the app. By default, ReflectMetadataProvider is used that...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found