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

fix(cmd): add missing --config handling #4323

Merged
merged 4 commits into from
Aug 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
- [#4091](https://github.com/ignite/cli/pull/4091) Fix race conditions in the plugin logic
- [#4128](https://github.com/ignite/cli/pull/4128) Check for duplicate proto fields in config
- [#4309](https://github.com/ignite/cli/pull/4309) Fix chain id for chain simulations
- [#4323](https://github.com/ignite/cli/pull/4323) Add missing `--config` handling in the `chain` commands

## [`v28.5.1`](https://github.com/ignite/cli/releases/tag/v28.5.1)

Expand Down
6 changes: 6 additions & 0 deletions ignite/cmd/chain_build.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,12 @@ func chainBuildHandler(cmd *cobra.Command, _ []string) error {
chainOption = append(chainOption, chain.CheckDependencies())
}

// check if custom config is defined
config, _ := cmd.Flags().GetString(flagConfig)
if config != "" {
chainOption = append(chainOption, chain.ConfigFile(config))
}

c, err := chain.NewWithHomeFlags(cmd, chainOption...)
if err != nil {
return err
Expand Down
1 change: 1 addition & 0 deletions ignite/cmd/chain_debug.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ func chainDebug(cmd *cobra.Command, session *cliui.Session) error {
chain.KeyringBackend(chaincmd.KeyringBackendTest),
}

// check if custom config is defined
config, _ := cmd.Flags().GetString(flagConfig)
if config != "" {
chainOptions = append(chainOptions, chain.ConfigFile(config))
Expand Down
5 changes: 5 additions & 0 deletions ignite/cmd/chain_faucet.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ func chainFaucetHandler(cmd *cobra.Command, args []string) error {
chain.CollectEvents(session.EventBus()),
}

config, _ := cmd.Flags().GetString(flagConfig)
if config != "" {
chainOption = append(chainOption, chain.ConfigFile(config))
}

c, err := chain.NewWithHomeFlags(cmd, chainOption...)
if err != nil {
return err
Expand Down
6 changes: 6 additions & 0 deletions ignite/cmd/chain_init.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,12 @@ func chainInitHandler(cmd *cobra.Command, _ []string) error {
chainOption = append(chainOption, chain.CheckDependencies())
}

// check if custom config is defined
config, _ := cmd.Flags().GetString(flagConfig)
if config != "" {
chainOption = append(chainOption, chain.ConfigFile(config))
}

c, err := chain.NewWithHomeFlags(cmd, chainOption...)
if err != nil {
return err
Expand Down
Loading