Skip to content

Commit

Permalink
fix(cmd): add missing --config handling (#4323)
Browse files Browse the repository at this point in the history
* fix(cmd): add missing `--config` handling

* cl

* cl++
  • Loading branch information
julienrbrt authored Aug 28, 2024
1 parent 959b955 commit 16a40f0
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 0 deletions.
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

0 comments on commit 16a40f0

Please sign in to comment.