Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions internal/infra/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -451,17 +451,17 @@ func runContainers(ctx context.Context, params RunParams) (err error) {
}
}

// update CA certificates as root prior to start debug shell or running dependabot commands
if err := updater.RunCmd(ctx, "update-ca-certificates", root); err != nil {
return err
}

if params.Debug {
if err := updater.RunShell(ctx, prox.url, params.ApiUrl, params.Job, params.UpdaterEnvironmentVariables); err != nil {
return err
}
} else {
// First, update CA certificates as root
if err := updater.RunCmd(ctx, "update-ca-certificates", root); err != nil {
return err
}

// Then run the dependabot commands as the dependabot user
// Run dependabot commands as a dependabot user
env := userEnv(prox.url, params.ApiUrl, params.Job, params.UpdaterEnvironmentVariables)
if params.Flamegraph {
env = append(env, "FLAMEGRAPH=1")
Expand Down
2 changes: 1 addition & 1 deletion internal/infra/updater.go
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ func (u *Updater) RunShell(ctx context.Context, proxyURL string, apiUrl string,
Tty: true,
User: dependabot,
Env: append(userEnv(proxyURL, apiUrl, job, additionalEnvVars), "DEBUG=1"),
Cmd: []string{"/bin/bash", "-c", "update-ca-certificates && /bin/bash"},
Cmd: []string{"/bin/bash"},
})
if err != nil {
return fmt.Errorf("failed to create exec: %w", err)
Expand Down