We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b737a7b commit b6f67fcCopy full SHA for b6f67fc
pkg/docker/docker.go
@@ -2,15 +2,15 @@ package docker
2
3
import (
4
"context"
5
- "os"
6
"strconv"
7
8
"github.com/replicate/cog/pkg/docker/command"
+ "github.com/replicate/cog/pkg/util"
9
"github.com/replicate/cog/pkg/util/console"
10
)
11
12
func NewClient(ctx context.Context, opts ...Option) (command.Command, error) {
13
- enabled, _ := strconv.ParseBool(os.Getenv("COG_DOCKER_SDK_CLIENT"))
+ enabled := util.GetEnvOrDefault("COG_DOCKER_SDK_CLIENT", true, strconv.ParseBool)
14
if enabled {
15
console.Debugf("Docker client: sdk")
16
return NewAPIClient(ctx, opts...)
0 commit comments