cli icon indicating copy to clipboard operation
cli copied to clipboard

Option --config ignored when .sequelizerc exists

Open vgeorge opened this issue 7 years ago • 2 comments

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?

vgeorge avatar Feb 04 '18 15:02 vgeorge

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?

nickarnold avatar Mar 23 '18 16:03 nickarnold

@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.

calebeno avatar Mar 20 '19 23:03 calebeno