Cli: Option --config ignored when .sequelizerc exists

Created on 4 Feb 2018  路  2Comments  路  Source: sequelize/cli

I want to use a config file to set seed task's options, like bellow:

sequelize db:seed:all --config ./config/sequelize.js

I expected that the CLI would use config options from the file ./config/sequelize.js but, if the file .sequelizerc exists, the option --config is ignored and the configuration is loaded from .sequelizerc. I'm using the following versions:

  • Node: 8.9.3
  • CLI: 3.2.0
  • ORM: 4.28.6

Shouldn't the options --config override the .sequelizerc file?

bug

Most helpful comment

Please consider another vote for this issue getting resolved. It's expected that a command-line switch like --config or --seeders-path would override any default values _and_ any values supplied in the .sequelizerc file. This currently doesn't appear to the be the case.

Is the current behavior (not allowing CLI switches to override .rc file values) intended for some reason or is it simply a use-case that was overlooked?

All 2 comments

Please consider another vote for this issue getting resolved. It's expected that a command-line switch like --config or --seeders-path would override any default values _and_ any values supplied in the .sequelizerc file. This currently doesn't appear to the be the case.

Is the current behavior (not allowing CLI switches to override .rc file values) intended for some reason or is it simply a use-case that was overlooked?

@sushantdhiman Any progress on this? I would say that it's definitely a bug, especially when considering that the command line override works correctly when doing a db:migrate action but not when doing a db:seed action.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

PavelPolyakov picture PavelPolyakov  路  5Comments

axetroy picture axetroy  路  3Comments

papb picture papb  路  5Comments

gotrevor picture gotrevor  路  5Comments

przbadu picture przbadu  路  3Comments