Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
johnstcn committed Sep 9, 2024
1 parent 9ef68fb commit 5672ada
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions envbuilder.go
Original file line number Diff line number Diff line change
Expand Up @@ -1475,7 +1475,7 @@ func initDockerConfigJSON(logf log.Func, magicDir magicdir.MagicDir, dockerConfi
if dockerConfigBase64 == "" {
return noop, nil
}
cfgPath := filepath.Join(magicDir.Path(), "config.json")
cfgPath := magicDir.Join("config.json")
decoded, err := base64.StdEncoding.DecodeString(dockerConfigBase64)
if err != nil {
return noop, fmt.Errorf("decode docker config: %w", err)
Expand All @@ -1498,8 +1498,9 @@ func initDockerConfigJSON(logf log.Func, magicDir magicdir.MagicDir, dockerConfi
}
logf(log.LevelInfo, "Wrote Docker config JSON to %s", cfgPath)
oldDockerConfig := os.Getenv("DOCKER_CONFIG")
os.Setenv("DOCKER_CONFIG", magicDir.String())
logf(log.LevelInfo, "Set DOCKER_CONFIG to %s", magicDir.String())
_ = os.Setenv("DOCKER_CONFIG", magicDir.Path())
newDockerConfig := os.Getenv("DOCKER_CONFIG")
logf(log.LevelInfo, "Set DOCKER_CONFIG to %s", newDockerConfig)
cleanup := func() error {
var cleanupErr error
cleanupOnce.Do(func() {
Expand Down

0 comments on commit 5672ada

Please sign in to comment.