diff --git a/internal/fullnode/pod_builder.go b/internal/fullnode/pod_builder.go index 73c85c37..2d95ccfc 100644 --- a/internal/fullnode/pod_builder.go +++ b/internal/fullnode/pod_builder.go @@ -319,7 +319,7 @@ func initContainers(crd *cosmosv1.CosmosFullNode, moniker string) []corev1.Conta addrbookCmd, addrbookArgs := DownloadAddrbookCommand(crd.Spec.ChainSpec) env := envVars(crd) - initCmd := fmt.Sprintf("%s --chain-id %s init %s", binary, crd.Spec.ChainSpec.ChainID, moniker) + initCmd := fmt.Sprintf("%s init --chain-id %s %s", binary, crd.Spec.ChainSpec.ChainID, moniker) if len(crd.Spec.ChainSpec.AdditionalInitArgs) > 0 { initCmd += " " + strings.Join(crd.Spec.ChainSpec.AdditionalInitArgs, " ") } diff --git a/internal/fullnode/pod_builder_test.go b/internal/fullnode/pod_builder_test.go index bd6f62e6..bf9285ed 100644 --- a/internal/fullnode/pod_builder_test.go +++ b/internal/fullnode/pod_builder_test.go @@ -287,8 +287,8 @@ func TestPodBuilder(t *testing.T) { require.Contains(t, freshCont.Args[1], `rm -rf "$HOME/.tmp/*"`) initCont := pod.Spec.InitContainers[1] - require.Contains(t, initCont.Args[1], `osmosisd --chain-id osmosis-123 init osmosis-6 --home "$CHAIN_HOME"`) - require.Contains(t, initCont.Args[1], `osmosisd --chain-id osmosis-123 init osmosis-6 --home "$HOME/.tmp"`) + require.Contains(t, initCont.Args[1], `osmosisd init --chain-id osmosis-123 osmosis-6 --home "$CHAIN_HOME"`) + require.Contains(t, initCont.Args[1], `osmosisd init --chain-id osmosis-123 osmosis-6 --home "$HOME/.tmp"`) mergeConfig1 := pod.Spec.InitContainers[3] // The order of config-merge arguments is important. Rightmost takes precedence.