Skip to content

Commit

Permalink
set CtxComposeVersionKey in initFabricCmd
Browse files Browse the repository at this point in the history
  • Loading branch information
bellaj committed Dec 30, 2024
1 parent 14e7721 commit 754b96d
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions cmd/init_fabric.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
///
// Copyright © 2024 Kaleido, Inc.
//
// SPDX-License-Identifier: Apache-2.0
Expand All @@ -23,6 +24,7 @@ import (

"github.com/spf13/cobra"

"github.com/hyperledger/firefly-cli/internal/docker"
"github.com/hyperledger/firefly-cli/internal/log"
"github.com/hyperledger/firefly-cli/internal/stacks"
"github.com/hyperledger/firefly-cli/pkg/types"
Expand All @@ -36,6 +38,13 @@ var initFabricCmd = &cobra.Command{
RunE: func(cmd *cobra.Command, args []string) error {
ctx := log.WithVerbosity(context.Background(), verbose)
ctx = log.WithLogger(ctx, logger)

version, err := docker.CheckDockerConfig()
if err != nil {
return err
}
ctx = context.WithValue(ctx, docker.CtxComposeVersionKey{}, version)

stackManager := stacks.NewStackManager(ctx)
initOptions.BlockchainProvider = types.BlockchainProviderFabric.String()
initOptions.TokenProviders = []string{}
Expand Down

0 comments on commit 754b96d

Please sign in to comment.