MCPcopy
hub / github.com/docker/compose / copyLocalConfig

Function copyLocalConfig

pkg/e2e/framework.go:123–133  ·  pkg/e2e/framework.go::copyLocalConfig
(t testing.TB, configDir string)

Source from the content-addressed store, hash-verified

121}
122
123func copyLocalConfig(t testing.TB, configDir string) {
124 t.Helper()
125
126 // copy local config.json if exists
127 localConfig := filepath.Join(os.Getenv("HOME"), ".docker", "config.json")
128 // if no config present just continue
129 if _, err := os.Stat(localConfig); err != nil {
130 // copy the local config.json to the test config dir
131 CopyFile(t, localConfig, filepath.Join(configDir, "config.json"))
132 }
133}
134
135// initializePlugins copies the necessary plugin files to the temporary config
136// directory for the test.

Callers 1

NewCLIFunction · 0.85

Calls 1

CopyFileFunction · 0.85

Tested by

no test coverage detected