Skip to content

Commit a1b2e5d

Browse files
authored
Merge pull request #333 from bellaj/main
set CtxComposeVersionKey in initFabricCmd
2 parents 14e7721 + 754b96d commit a1b2e5d

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

cmd/init_fabric.go

+9
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
///
12
// Copyright © 2024 Kaleido, Inc.
23
//
34
// SPDX-License-Identifier: Apache-2.0
@@ -23,6 +24,7 @@ import (
2324

2425
"github.com/spf13/cobra"
2526

27+
"github.com/hyperledger/firefly-cli/internal/docker"
2628
"github.com/hyperledger/firefly-cli/internal/log"
2729
"github.com/hyperledger/firefly-cli/internal/stacks"
2830
"github.com/hyperledger/firefly-cli/pkg/types"
@@ -36,6 +38,13 @@ var initFabricCmd = &cobra.Command{
3638
RunE: func(cmd *cobra.Command, args []string) error {
3739
ctx := log.WithVerbosity(context.Background(), verbose)
3840
ctx = log.WithLogger(ctx, logger)
41+
42+
version, err := docker.CheckDockerConfig()
43+
if err != nil {
44+
return err
45+
}
46+
ctx = context.WithValue(ctx, docker.CtxComposeVersionKey{}, version)
47+
3948
stackManager := stacks.NewStackManager(ctx)
4049
initOptions.BlockchainProvider = types.BlockchainProviderFabric.String()
4150
initOptions.TokenProviders = []string{}

0 commit comments

Comments
 (0)