sequelize / cli

The Sequelize CLI
MIT License
2.53k stars 525 forks source link

Option --config ignored when .sequelizerc exists #617

Open vgeorge opened 6 years ago

vgeorge commented 6 years ago

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:

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

nickarnold commented 6 years ago

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?

calebeno commented 5 years ago

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